From aef476cc4d819ef721f81ddaa75ef4cc57e46454 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 7 Oct 2021 11:32:13 +1100 Subject: [PATCH] Correct chat id --- packages/status-communities/src/community.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/status-communities/src/community.ts b/packages/status-communities/src/community.ts index 4e616804..2ed455a3 100644 --- a/packages/status-communities/src/community.ts +++ b/packages/status-communities/src/community.ts @@ -76,20 +76,20 @@ export class Community { } let communityChat: CommunityChat | undefined; - let chatId: string | undefined; + let chatUuid: string | undefined; this.description.chats.forEach((_chat, _id) => { - if (chatId) return; + if (chatUuid) return; if (_chat.identity?.displayName === chatName) { - chatId = _id; + chatUuid = _id; communityChat = _chat; } }); - if (!communityChat || !chatId) + if (!communityChat || !chatUuid) throw `Failed to retrieve community community chat with name ${chatName}`; - return Chat.create(chatId); + return Chat.create(this.publicKeyStr + chatUuid); } }