support for custom queries + presence update handler

This commit is contained in:
Adhiraj
2020-04-17 18:34:36 +05:30
parent 9ea4b0b381
commit 2cd560c430
5 changed files with 20 additions and 1 deletions

View File

@@ -37,6 +37,10 @@ module.exports = function(WhatsAppWeb) {
]
this.sendBinary(json, [10, 128])
}
// check the presence status of a given jid
WhatsAppWeb.prototype.requestPresenceUpdate = function (jid) {
this.query(["action","presence","subscribe",jid])
}
// send a text message to someone, optionally you can provide a quoted message & the timestamp for the message
WhatsAppWeb.prototype.sendTextMessage = function (id, txt, quoted=null, timestamp=null) {
let message