Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No new message notification on phone if message received in Baileys #299

Closed
abdulloh10 opened this issue Jul 31, 2023 · 12 comments
Closed
Labels
enhancement New feature or request

Comments

@abdulloh10
Copy link

Hello
For some reason, the notification of the received message does not appear on the phone if the message is also received in Baileys. How can I get notifications for new messages on my phone?

@zennn08
Copy link
Contributor

zennn08 commented Aug 1, 2023

You can set markOnlineOnConnect to false in your configuration

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

@abdulloh10
Copy link
Author

You can set markOnlineOnConnect to false in your configuration

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

Thank You

@salomonamiga
Copy link

hi

im using https://github.com/code-chat-br/whatsapp-api
with uses code as an implementation of Baileys,
but im having the same issue, and can't find anywhere how to solve it, I tried to ask on that git repo but have no answer
I tried to implement markOnlineOnConnect: false on the socketConfig but is not working for me
maybe here someone can help me on this ? I need the notifications !
Thank you !

@abdulloh10 abdulloh10 reopened this Sep 12, 2023
@abdulloh10
Copy link
Author

abdulloh10 commented Sep 12, 2023

hi

im using https://github.com/code-chat-br/whatsapp-api with uses code as an implementation of Baileys, but im having the same issue, and can't find anywhere how to solve it, I tried to ask on that git repo but have no answer I tried to implement markOnlineOnConnect: false on the socketConfig but is not working for me maybe here someone can help me on this ? I need the notifications ! Thank you !

const sock = makeWASocket({
...config,
markOnlineOnConnect: false
})
does not completely solve the problem. After scanning to add a new device, there is no notification. After restarting the node, a notification then appears. So restart the node every time you add a new device

@salomonamiga
Copy link

hi
im using https://github.com/code-chat-br/whatsapp-api with uses code as an implementation of Baileys, but im having the same issue, and can't find anywhere how to solve it, I tried to ask on that git repo but have no answer I tried to implement markOnlineOnConnect: false on the socketConfig but is not working for me maybe here someone can help me on this ? I need the notifications ! Thank you !

const sock = makeWASocket({ ...config, markOnlineOnConnect: false }) does not completely solve the problem. After scanning to add a new device, there is no notification. After restarting the node, a notification then appears.

sorry I didnt understand 100% this
"After restarting the node, a notification then appears."
you mean you get WhatsApp notifications ?

is there any solution to my problem or anyhow the markOnlineOnConnect: false works ?

@abdulloh10
Copy link
Author

abdulloh10 commented Sep 12, 2023

hi
im using https://github.com/code-chat-br/whatsapp-api with uses code as an implementation of Baileys, but im having the same issue, and can't find anywhere how to solve it, I tried to ask on that git repo but have no answer I tried to implement markOnlineOnConnect: false on the socketConfig but is not working for me maybe here someone can help me on this ? I need the notifications ! Thank you !

const sock = makeWASocket({ ...config, markOnlineOnConnect: false }) does not completely solve the problem. After scanning to add a new device, there is no notification. After restarting the node, a notification then appears.

sorry I didnt understand 100% this "After restarting the node, a notification then appears." you mean you get WhatsApp notifications ?

is there any solution to my problem or anyhow the markOnlineOnConnect: false works ?

Yes, after applied markOnlineOnConnect: false and pm2 restart whatsapp a notification in mobile phone appears. But later the notification may disappear again. The solution is to pm2 restart again

@salomonamiga
Copy link

hi
im using https://github.com/code-chat-br/whatsapp-api with uses code as an implementation of Baileys, but im having the same issue, and can't find anywhere how to solve it, I tried to ask on that git repo but have no answer I tried to implement markOnlineOnConnect: false on the socketConfig but is not working for me maybe here someone can help me on this ? I need the notifications ! Thank you !

const sock = makeWASocket({ ...config, markOnlineOnConnect: false }) does not completely solve the problem. After scanning to add a new device, there is no notification. After restarting the node, a notification then appears.

sorry I didnt understand 100% this "After restarting the node, a notification then appears." you mean you get WhatsApp notifications ?
is there any solution to my problem or anyhow the markOnlineOnConnect: false works ?

Yes, after applied markOnlineOnConnect: false and pm2 restart whatsapp a notification in mobile phone appears. But later the notification may disappear again. The solution is to pm2 restart again

thank you for the clarification, is so sad there is no way to fix this, I have seen other APIs can do, but this API has much more features, this is the only one I wish there is a fix anytime soon

@Auties00 Auties00 added the enhancement New feature or request label Oct 5, 2023
@azudindaem
Copy link
Contributor

This dirty trick might help

if(events['messages.upsert']) {
   client.sendPresenceUpdate('unavailable')

@kyraex
Copy link
Contributor

kyraex commented Oct 24, 2023

This dirty trick might help

if(events['messages.upsert']) {
   client.sendPresenceUpdate('unavailable')

If there are high number of incoming messages, will it cause any issue due to spamming of presence update?

@diorgenesgrzesiuk
Copy link

Any progress on this problem?

By making the suggestions above, the alerts on the cell phone temporarily work again... then the problem continues...

@PurpShell
Copy link
Collaborator

This dirty trick might help

if(events['messages.upsert']) {
   client.sendPresenceUpdate('unavailable')

If there are high number of incoming messages, will it cause any issue due to spamming of presence update?

Yes it will spam, this is not a proper way of doing things. This person should've set a debounce on it

@PurpShell
Copy link
Collaborator

For everyone confused here: client.sendPresenceUpdate('unavailable')

Readme reference: https://github.com/WhiskeySockets/Baileys?tab=readme-ov-file#update-presence

@PurpShell PurpShell closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants