Fixed promise bug

This commit is contained in:
Adhiraj
2020-05-09 19:01:22 +05:30
parent 91cfbd1412
commit eb7387b6fb
5 changed files with 15 additions and 13 deletions

View File

@@ -186,13 +186,7 @@ module.exports = function(WhatsAppWeb) {
// if this message is responding to a query
if (this.callbacks[messageTag]) {
const q = this.callbacks[messageTag]
if (q.queryJSON[1] === "exist") {
q.callback(json.status == 200, q.queryJSON[2])
} else if (q.queryJSON[1] === "mediaConn") {
q.callback(json.media_conn)
} else {
q.callback(json)
}
q.callback([json, q.queryJSON])
delete this.callbacks[messageTag]
}
} else {