code-chat-br / whatsapp-api

CodeChat - WhatsApp Api

Home Page:https://docs.codechat.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

want to find unread messages on connection open

saadnust opened this issue · comments

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

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?

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.