Merge pull request #2 from status-im/fix/issue-3329

fix(@desktop/communities): processing response from InviteUsers call
This commit is contained in:
Iuri Matias 2021-09-09 15:03:43 -04:00 committed by GitHub
commit 23be94a923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
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]) =
status_chat.inviteUsersToCommunity(communityId, pubKeys)
let response = status_chat.inviteUsersToCommunity(communityId, pubKeys)
discard self.processMessageUpdateAfterSend(response)
proc removeUserFromCommunity*(self: ChatModel, communityId: string, pubKey: string) =
status_chat.removeUserFromCommunity(communityId, pubKey)

View File

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