messages are proto objects

This commit is contained in:
Adhiraj
2020-09-14 16:38:53 +05:30
parent f41bf888f1
commit 8bc19a8a82
2 changed files with 12 additions and 9 deletions

View File

@@ -145,9 +145,10 @@ WAConnectionTest('Messages', conn => {
const JID = '1234-1234@g.us'
conn.sendMessage(JID, 'hello', MessageType.text)
conn.on ('message-status-update', update => {
conn.on ('message-status-update', async update => {
if (update.to === JID) {
assert.equal (update.type, WA_MESSAGE_STATUS_TYPE.ERROR)
await conn.deleteChat (JID)
done ()
}
})