Fixed: Update for new Chat Groups (#804)

* Update for new Chat Groups

* Update for new Chat Groups 

WhatsApp changed the ID form of new groups

* Fixed: Update for new Chat Groups
This commit is contained in:
Vinicius Silva
2021-11-10 18:41:08 +00:00
committed by GitHub
parent 24b249430d
commit b616cf5aca

View File

@@ -494,10 +494,6 @@ export class WAConnection extends Base {
/** Adds the given message to the appropriate chat, if the chat doesn't exist, it is created */
protected async chatAddMessageAppropriate (message: WAMessage) {
const jid = whatsappID(message.key.remoteJid)
if(isGroupID(jid) && !jid.includes('-')) {
this.logger.warn({ gid: jid }, 'recieved odd group ID')
return
}
const chat = this.chats.get(jid) || await this.chatAdd (jid)
this.chatAddMessage (message, chat)
}