core: add viaGroupLink to Connection (#1248)

This commit is contained in:
JRoberts
2022-10-24 14:28:58 +04:00
committed by GitHub
parent 5265667c0c
commit deeb2e891a
8 changed files with 41 additions and 49 deletions

View File

@@ -93,8 +93,8 @@ responseToView testView = \case
CRGroupCreated g -> viewGroupCreated g
CRGroupMembers g -> viewGroupMembers g
CRGroupsList gs -> viewGroupsList gs
CRSentGroupInvitation g c _ viaLink ->
if viaLink
CRSentGroupInvitation g c _ ->
if viaGroupLink . contactConn $ c
then [ttyContact' c <> " invited to group " <> ttyGroup' g <> " via your group link"]
else ["invitation to join the group " <> ttyGroup' g <> " sent to " <> ttyContact' c]
CRFileTransferStatus ftStatus -> viewFileTransferStatus ftStatus
@@ -134,8 +134,8 @@ responseToView testView = \case
CRSndFileCancelled _ ft -> sendingFile_ "cancelled" ft
CRSndFileRcvCancelled _ ft@SndFileTransfer {recipientDisplayName = c} ->
[ttyContact c <> " cancelled receiving " <> sndFile ft]
CRContactConnecting _ _ -> []
CRContactConnected ct userCustomProfile _ -> viewContactConnected ct userCustomProfile testView
CRContactConnecting _ -> []
CRContactConnected ct userCustomProfile -> viewContactConnected ct userCustomProfile testView
CRContactAnotherClient c -> [ttyContact' c <> ": contact is connected to another client"]
CRSubscriptionEnd acEntity -> [sShow (connId (entityConnection acEntity :: Connection)) <> ": END"]
CRContactsDisconnected srv cs -> [plain $ "server disconnected " <> showSMPServer srv <> " (" <> contactList cs <> ")"]