load message bug fix

This commit is contained in:
Adhiraj
2020-08-25 17:54:52 +05:30
parent 616ff1e5f2
commit aac613094c
2 changed files with 12 additions and 7 deletions

View File

@@ -116,6 +116,14 @@ WAConnectionTest('Misc', (conn) => {
assert.ok (response.messages.length >= 0)
}
})
it('should load a single message', async () => {
const {messages} = await conn.loadMessages (testJid, 10)
for (var message of messages) {
const loaded = await conn.loadMessage (testJid, message.key.id)
assert.equal (loaded.key.id, message.key.id)
await delay (1000)
}
})
it('should update presence', async () => {
const presences = Object.values(Presence)