mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
bufix: sometimes 'this.chats.get(jid)' return null (#803)
This commit is contained in:
@@ -664,7 +664,7 @@ export class WAConnection extends Base {
|
||||
}
|
||||
protected emitGroupUpdate = (jid: string, update: Partial<WAGroupMetadata>) => {
|
||||
const chat = this.chats.get(jid)
|
||||
if (chat.metadata) Object.assign(chat.metadata, update)
|
||||
if (chat && chat.metadata) Object.assign(chat.metadata, update)
|
||||
this.emit ('group-update', { jid, ...update })
|
||||
}
|
||||
protected chatUpdateTime = (chat, stamp: number) => this.chats.update (chat.jid, c => c.t = stamp)
|
||||
|
||||
Reference in New Issue
Block a user