Manage group metdata state in Baileys + Remove presence from Contact

This commit is contained in:
Adhiraj Singh
2020-12-03 13:16:37 +05:30
parent d4b453f0e5
commit 6d7dc4d9fe
7 changed files with 136 additions and 66 deletions

View File

@@ -89,7 +89,7 @@ export class WAConnection extends Base {
this.conn.on('message', data => this.onMessageRecieved(data as any))
this.conn.on ('open', async () => {
this.conn.once('open', async () => {
this.startKeepAliveRequest()
this.logger.info(`connected to WhatsApp Web server, authenticating via ${reconnectID ? 'reconnect' : 'takeover'}`)
@@ -109,8 +109,8 @@ export class WAConnection extends Base {
)
this.conn
.removeAllListeners ('error')
.removeAllListeners ('close')
.removeAllListeners('error')
.removeAllListeners('close')
this.stopDebouncedTimeout ()
resolve ({ ...authResult, ...chatsResult })
} catch (error) {