[BUG] Send Presence update or "typing..." not working.
sostenesapollo opened this issue · comments
I'm using the last version.
console.log('jid', jid);
await this.clientsMap.get(chat)?.conn?.presenceSubscribe(jid)
await this.clientsMap.get(chat)?.conn?.sendPresenceUpdate("available", jid);
await this.clientsMap.get(chat)?.conn?.sendPresenceUpdate("composing", jid);
await delay(500)
await this.clientsMap.get(chat)?.conn?.sendPresenceUpdate("composing", jid);
await delay(5000)
await this.sendMessage(chat, { type:'text', text: new Date().toDateString() }, jid)
Nothing happens.
Here it worked by reversing the order of these two lines
await this.clientsMap.get(chat)?.conn?.presenceSubscribe(jid)
await this.clientsMap.get(chat)?.conn?.sendPresenceUpdate("available", jid);
I first notify the user that I am online and then I can hear their presence