code-chat-br / whatsapp-api

CodeChat - WhatsApp Api
https://docs.codechat.dev
Apache License 2.0
593 stars 245 forks source link

want to find unread messages on connection open #59

Closed saadnust closed 7 months ago

saadnust commented 1 year ago

Need for webhook call with unread messages when a connection is opens OR Endpoint to fetch unread only!

Yashasv-Prajapati commented 1 year ago

Hey @jrCleber, I wish to contribute to this issue. I've been reading the code base and have set it up for development. I came across the function markMessageAsRead and other functions to fetch messages, however, I can't seem to find anything that somehow gives count or anything related to unread Messages.

I couldn't find anything related to it in Baileys either.

Could you please guide me towards solving this issue?

jrCleber commented 1 year ago

That's a good question. There really isn't anything implemented about this in the library. Because the recipient of the message may have disabled read confirmation, so the message read event is not emitted. You need to implement this on your side, with an accountant for example.