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 } /**