fix(@desktop/communities): processing response from InviteUsers call

This commit is contained in:
Andrei Smirnov 2021-09-09 08:51:07 +03:00
parent 0b24d7a341
commit 8965c4bcca
2 changed files with 6 additions and 4 deletions

View File

@ -505,10 +505,12 @@ proc leaveCommunity*(self: ChatModel, communityId: string) =
status_chat.leaveCommunity(communityId) status_chat.leaveCommunity(communityId)
proc inviteUserToCommunity*(self: ChatModel, communityId: string, pubKey: string) = proc inviteUserToCommunity*(self: ChatModel, communityId: string, pubKey: string) =
status_chat.inviteUsersToCommunity(communityId, @[pubKey]) let response = status_chat.inviteUsersToCommunity(communityId, @[pubKey])
discard self.processMessageUpdateAfterSend(response)
proc inviteUsersToCommunity*(self: ChatModel, communityId: string, pubKeys: seq[string]) = proc inviteUsersToCommunity*(self: ChatModel, communityId: string, pubKeys: seq[string]) =
status_chat.inviteUsersToCommunity(communityId, pubKeys) let response = status_chat.inviteUsersToCommunity(communityId, pubKeys)
discard self.processMessageUpdateAfterSend(response)
proc removeUserFromCommunity*(self: ChatModel, communityId: string, pubKey: string) = proc removeUserFromCommunity*(self: ChatModel, communityId: string, pubKey: string) =
status_chat.removeUserFromCommunity(communityId, pubKey) status_chat.removeUserFromCommunity(communityId, pubKey)

View File

@ -453,8 +453,8 @@ proc joinCommunity*(communityId: string) =
proc leaveCommunity*(communityId: string) = proc leaveCommunity*(communityId: string) =
discard callPrivateRPC("leaveCommunity".prefix, %*[communityId]) discard callPrivateRPC("leaveCommunity".prefix, %*[communityId])
proc inviteUsersToCommunity*(communityId: string, pubKeys: seq[string]) = proc inviteUsersToCommunity*(communityId: string, pubKeys: seq[string]): string =
discard callPrivateRPC("inviteUsersToCommunity".prefix, %*[{ callPrivateRPC("inviteUsersToCommunity".prefix, %*[{
"communityId": communityId, "communityId": communityId,
"users": pubKeys "users": pubKeys
}]) }])