fix(group-chats): fix adding new member to group chat

This commit is contained in:
Jonathan Rainville 2022-04-12 13:26:04 -04:00 committed by Iuri Matias
parent 1fdef43d18
commit 6828055087
4 changed files with 8 additions and 7 deletions

View File

@ -291,8 +291,9 @@ proc rejectContactRequest*(self: Controller, publicKey: string) =
proc blockContact*(self: Controller, publicKey: string) =
self.contactService.blockContact(publicKey)
proc addGroupMembers*(self: Controller, communityID: string, chatId: string, pubKeys: seq[string]) =
self.chatService.addGroupMembers(communityID, chatId, pubKeys)
proc addGroupMembers*(self: Controller, chatId: string, pubKeys: seq[string]) =
let communityId = if self.isCommunitySection: self.sectionId else: ""
self.chatService.addGroupMembers(communityId, chatId, pubKeys)
proc removeMemberFromGroupChat*(self: Controller, communityID: string, chatId: string, pubKey: string) =
self.chatService.removeMemberFromGroupChat(communityID, chatId, pubKey)

View File

@ -194,7 +194,7 @@ method rejectAllContactRequests*(self: AccessInterface) {.base.} =
method blockContact*(self: AccessInterface, publicKey: string) {.base.} =
raise newException(ValueError, "No implementation available")
method addGroupMembers*(self: AccessInterface, communityID: string, chatId: string, pubKeys: string) {.base.} =
method addGroupMembers*(self: AccessInterface, chatId: string, pubKeys: string) {.base.} =
raise newException(ValueError, "No implementation available")
method removeMemberFromGroupChat*(self: AccessInterface, communityID: string, chatId: string, pubKey: string) {.base.} =

View File

@ -673,8 +673,8 @@ method onMeMentionedInEditedMessage*(self: Module, chatId: string, editedMessage
var (sectionHasUnreadMessages, sectionNotificationCount) = self.view.chatsModel().getAllNotifications()
self.updateBadgeNotifications(chatId, sectionHasUnreadMessages, sectionNotificationCount + 1)
method addGroupMembers*(self: Module, communityID: string, chatId: string, pubKeys: string) =
self.controller.addGroupMembers(communityID, chatId, self.convertPubKeysToJson(pubKeys))
method addGroupMembers*(self: Module, chatId: string, pubKeys: string) =
self.controller.addGroupMembers(chatId, self.convertPubKeysToJson(pubKeys))
method removeMemberFromGroupChat*(self: Module, communityID: string, chatId: string, pubKey: string) =
self.controller.removeMemberFromGroupChat(communityID, chatId, pubKey)

View File

@ -181,8 +181,8 @@ QtObject:
proc removeCommunityChat*(self: View, chatId: string) {.slot} =
self.delegate.removeCommunityChat(chatId)
proc addGroupMembers*(self: View, communityID: string, chatId: string, pubKeys: string) {.slot.} =
self.delegate.addGroupMembers(communityID, chatId, pubKeys)
proc addGroupMembers*(self: View, chatId: string, pubKeys: string) {.slot.} =
self.delegate.addGroupMembers(chatId, pubKeys)
proc removeMemberFromGroupChat*(self: View, communityID: string, chatId: string, pubKey: string) {.slot.} =
self.delegate.removeMemberFromGroupChat(communityID, chatId, pubKey)