From df3f9984a8377eec4b83a11bec9b7c8b095224c7 Mon Sep 17 00:00:00 2001 From: Mikhail Rogachev Date: Wed, 22 May 2024 23:19:07 +0200 Subject: [PATCH] fix: correct member list for new community channels (#14873) --- .../main/chat_section/chat_content/users/controller.nim | 8 ++++++-- vendor/status-go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/modules/main/chat_section/chat_content/users/controller.nim b/src/app/modules/main/chat_section/chat_content/users/controller.nim index e83879c64..cacd0ade3 100644 --- a/src/app/modules/main/chat_section/chat_content/users/controller.nim +++ b/src/app/modules/main/chat_section/chat_content/users/controller.nim @@ -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): diff --git a/vendor/status-go b/vendor/status-go index 133ad0946..c8dfbe682 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit 133ad0946b8d8e89aa132227a9074ce47420f7e9 +Subproject commit c8dfbe682dfd299d1ab5701837864eda2588bab4