From 4b78c119c3a53747d269bca0188a6798cb0d900b Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 4 Apr 2022 12:30:37 -0400 Subject: [PATCH] fix(members): fix error in logs when getting members for public chat --- src/app_service/service/chat/service.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app_service/service/chat/service.nim b/src/app_service/service/chat/service.nim index 97ec96d2c4..e29b4f85c4 100644 --- a/src/app_service/service/chat/service.nim +++ b/src/app_service/service/chat/service.nim @@ -454,7 +454,7 @@ QtObject: proc makeAdmin*(self: Service, communityID: string, chatID: string, memberId: string) = try: - let response = status_group_chat.makeAdmin(communityID, chatId, memberId) + discard status_group_chat.makeAdmin(communityID, chatId, memberId) for member in self.chats[chatId].members.mitems: if (member.id == memberId): member.admin = true @@ -492,6 +492,9 @@ QtObject: try: var realChatId = chatId.replace(communityID, "") let response = status_chat.getMembers(communityID, realChatId) + if response.result.kind == JNull: + # No members. Could be a public chat + return let myPubkey = singletonInstance.userProfile.getPubKey() result = @[] for (id, memberObj) in response.result.pairs: