robvanderleek / mudslide

Send WhatsApp messages from the command-line
ISC License
120 stars 12 forks source link

Prevent message getting auto-marked as 'read' on the senders devices #75

Closed vinne81 closed 1 month ago

vinne81 commented 5 months ago

Hi,

I'm not sure if this is something that can be prevented, by either Mudslide or Baileys.

I have a Whatsapp group that I'm sending to, I'm part of the group. On my other devices (like a phone) I don't get a notification that a new message is sent. Makes sense, like, I just wrote it myself. Why would I want to be notified about it. However, I didn't write it myself, it's an automated message sent by Mudslide.

Apart from that Mudslide works great, and I'm not saying this is problem or a bug. Just looking for a solution.

Thanks Vincent

robvanderleek commented 5 months ago

Hi @vinne81

As you clearly explain in your question, this is indeed how it works: to WA it appears as if you are sending the message yourself (because even though it's automated, your credentials are used for authentication when logging in with the QR code).

Maybe there is a way in the WA API to flag a message as "automated" or "bot", or something like that, but I haven't found that option in the Baileys library.

KR, Rob

vinne81 commented 5 months ago

Hi Rob

I've been browsing the Issues for Baileys looking for clues, and I found a thread that might contain some info related to this issue. Although they are talking about notifications for incoming messages, and we're talking about our own sent messages.

I'm not sure what causes the messages to be auto-read. Some baked-in Whatsapp thing that whatever you sent, you auto read, or is it the client that sends the messages that also reads it.

Anyway: https://github.com/WhiskeySockets/Baileys/issues/299

const sock = makeWASocket({ ...config, markOnlineOnConnect: false })

Could the above help?

Best regards Vincent

create-issue-branch[bot] commented 5 months ago

Branch issue-75-Prevent_message_getting_auto-marked_as_read_on_the_senders_devices created!

robvanderleek commented 5 months ago

Hi @vinne81

I tried the option in this branch, unfortunately it doesn't seem to affect the behavior described above.

You should be able to run the branch yourself if you want to verify:

npx github:robvanderleek/mudslide#issue-75-Prevent_message_getting_auto-marked_as_read_on_the_senders_devices
stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.