From b473ed750253e032c9988c9daba947c2b17f6f9c Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Thu, 29 Apr 2021 23:00:57 +0530 Subject: [PATCH] Add group title fix --- src/WAConnection/8.Groups.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/WAConnection/8.Groups.ts b/src/WAConnection/8.Groups.ts index 61cd065..bf91e2e 100644 --- a/src/WAConnection/8.Groups.ts +++ b/src/WAConnection/8.Groups.ts @@ -88,8 +88,10 @@ export class WAConnection extends Base { metadata = await this.groupMetadata (gid) this.logger.warn (`group ID switched from ${gid} to ${response.gid}`) } - await this.chatAdd (response.gid, title) - this.chats.get(response.gid).metadata = metadata + await this.chatAdd(response.gid, title) + const chat = this.chats.get(response.gid) + chat.metadata = metadata + chat.name = title // in case the chat wasn't inserted return response } /**