Read receipt fix + export proto

This commit is contained in:
Adhiraj Singh
2020-07-09 15:22:25 +05:30
parent 7a2a5e03a8
commit 3a1e59ed17
5 changed files with 10 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ export default class WhatsAppWebBase extends WAConnection {
}
/** Set the callback for presence updates; if someone goes offline/online, this callback will be fired */
setOnPresenceUpdate(callback: (p: PresenceUpdate) => void) {
this.registerCallback('Presence', (json) => callback(json[1]))
this.registerCallback('Presence', json => callback(json[1]))
}
/** Query whether a given number is registered on WhatsApp */
isOnWhatsApp = (jid: string) => this.query(['query', 'exist', jid]).then((m) => m.status === 200)