fix: correct member list for new community channels (#14873)

This commit is contained in:
Mikhail Rogachev 2024-05-22 23:19:07 +02:00 committed by GitHub
parent 6549348324
commit df3f9984a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -124,8 +124,12 @@ proc getChat*(self: Controller): ChatDto =
proc getChatMembers*(self: Controller): seq[ChatMember] =
if self.belongsToCommunity:
let myCommunity = self.getMyCommunity()
return myCommunity.getCommunityChat(self.chatId).members
else:
# TODO: when a new channel is added, chat may arrive earlier and we have no up to date community yet
# see log here: https://github.com/status-im/status-desktop/issues/14442#issuecomment-2120756598
# should be resolved in https://github.com/status-im/status-desktop/issues/14219
let members = myCommunity.getCommunityChat(self.chatId).members
if members.len > 0:
return members
return self.chatService.getChatById(self.chatId).members
proc getContactNameAndImage*(self: Controller, contactId: string):

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 133ad0946b8d8e89aa132227a9074ce47420f7e9
Subproject commit c8dfbe682dfd299d1ab5701837864eda2588bab4