delete contact api (#243)

* delete contact api

* chat command
This commit is contained in:
Efim Poberezkin
2022-01-31 15:14:56 +04:00
committed by GitHub
parent 945ed3f7cb
commit 047aa7deef
4 changed files with 40 additions and 48 deletions

View File

@@ -60,7 +60,7 @@ responseToView cmd = \case
CRInvitation cReq -> r' $ viewConnReqInvitation cReq
CRSentConfirmation -> r' ["confirmation sent!"]
CRSentInvitation -> r' ["connection request sent!"]
CRContactDeleted c -> r' [ttyContact c <> ": contact is deleted"]
CRContactDeleted Contact {localDisplayName} -> r' [ttyContact localDisplayName <> ": contact is deleted"]
CRAcceptingContactRequest c -> r' [ttyContact c <> ": accepting contact request..."]
CRUserContactLinkCreated cReq -> r' $ connReqContact_ "Your new chat address is created!" cReq
CRUserContactLinkDeleted -> r' viewUserContactLinkDeleted
@@ -445,7 +445,7 @@ viewChatError :: ChatError -> [StyledString]
viewChatError = \case
ChatError err -> case err of
CEInvalidConnReq -> viewInvalidConnReq
CEContactGroups c gNames -> [ttyContact c <> ": contact cannot be deleted, it is a member of the group(s) " <> ttyGroups gNames]
CEContactGroups Contact {localDisplayName} gNames -> [ttyContact localDisplayName <> ": contact cannot be deleted, it is a member of the group(s) " <> ttyGroups gNames]
CEGroupDuplicateMember c -> ["contact " <> ttyContact c <> " is already in the group"]
CEGroupDuplicateMemberId -> ["cannot add member - duplicate member ID"]
CEGroupUserRole -> ["you have insufficient permissions for this group command"]