Closed bauti-defi closed 2 years ago
Any news on this?
This happened to me too. Even worse. I use the regular WhatsApp application and the sendSend() doesn't work at all.
@Bautista-Baiocchi-lora @mrizkypk
I've issued a patch that double checks the unread count and attempts alternative methods to clear the unseen messages from the chat.
Please restart and try agian.
thanks
I have restarted the process but sendUnsend() is still not working. This just happened after WhatsApp forced MD for my account (no BETA label inside WhatsApp app).
Because of that I have to use MD otherwise logout occurs after few minutes after login.
After couple of restarts, sendUnsend() is working right now. Thanks...
EDIT
But somehow it's not always works.
@mrizkypk I've tested this on MD.
Can u explain in what situation exactly it does not work?
And by "it does not work" do you mean it doesn't clear unread messages indicator on the phone or the session? Please be as clear as possible.
Should be working fine now
The problem still exists. SendSeen() does not work, so when i catch the unread messages they are not marked as seen by the method SendSeen() and always when you restart the session those message appear again.
Steps To Reproduce:
const handleUnreadMessages = async (client: Client) => {
const unReadChats = await client.getUnreadMessages(false, false, true);
for (var chat in unReadChats) {
const markAsSeen = await client.sendSeen(unReadChats[chat].id);
console.log("Seen: ", markAsSeen)
if (!unReadChats[chat].isGroup) {
//@ts-ignore
await client.sendButtons(unReadChats[chat].id,"Hola, volvi! π€",[{id:"go-back-to-menu", text:"Hola Beto"}], "", "")
}
}
};```
@alanknm01 try again making sure the host account device has the correct seen state.
should be improved with latest patches. please comment if still experiencing issues
Are you using the latest version of the library?
What type of session are you experiencing this issue on?
Legacy (Normal)
What type of host account are you experiencing this issue on?
Business account
Mode
My own code
Current Behavior
client.sendSeen(chatId)
is very inconsistent.As far as I can tell, It only works as expected for messages received after the client starts up and is idle (waiting for inbound messages).
I have noticed that it doesn't work as expected when trying to handle messages that came in during client downtime.
Example:
At start up I use
client.getUnreadMessages()
to pull all the messages that were received and not answered during client downtime. Callingclient.sendSeen()
on the chat of the respective messages returnstrue
but nothing actually happens. The messages continue to be "unread" on the device.Expected Behavior
client.sendSeen(chatId)
should set all messages inside a chat to read if the return istrue
.Steps To Reproduce
create() code
DEBUG INFO
Environment
Screenshots/Logs
No response
Anything else?
No response