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 whatsapp notification sound on my phone when pidgin is run #188

Open
jeremyp3 opened this issue Feb 16, 2024 · 10 comments
Open

no whatsapp notification sound on my phone when pidgin is run #188

jeremyp3 opened this issue Feb 16, 2024 · 10 comments
Labels
barren Cannot reproduce

Comments

@jeremyp3
Copy link

using whatsapp more these days with the plugin for pidgin, I've noticed that I don't get any sound in whatsapp notifications when pidgin is launched.

Is this something whatsapp wants to happen, and can it be fixed?

I'd like to point out that I do receive the notifications on my phone, just that there's no sound.

@hoehermann
Copy link
Owner

Another user reported similar issues. We suspect that WhatsApp tones down the "intensity" of notifications if there is another session active. The behaviour has changed from version to version and is different on iOS and Android. Can you set Pidgins state to "away" and check how that changes the behaviour for your setup?

@jeremyp3
Copy link
Author

jeremyp3 commented Feb 17, 2024

I don't notice any change when switching to status away, except for the loss of contact refreshes. But notifications are still soundless on my phone :(

I deactivated / reactivated the plugin after setting pidgin to status away but nothing.

my phone runs on android :)

@hoehermann
Copy link
Owner

hoehermann commented Feb 17, 2024

I, too, use Android devices. However, I cannot reproduce the behaviour. I am sorry. I am using WhatsApp 2.24.3.79 on my main phone and in the emulator for testing purposes. This is what happens for me:

  • If Pidgin is set to status "available", then there are no notifications on the phone (and consequently no sound is played).
  • If Pidgin is set to "away", then notifications are shown on the pone (with their sound being played).

The behaviour is consistent with having WhatsApp Web open instead of Pidgin. I assume this is by design and henceforth working as intended.

Please note that in Pidgin you can set an individual status for every account via the "saved status" feature.
Also, you may write ?presenceunavailable in any chat window to enable a special "hidden state" mode. It is a hack included specifically for a similar situation.

@hoehermann hoehermann added the barren Cannot reproduce label Feb 17, 2024
@brianjmurrell
Copy link

brianjmurrell commented Feb 28, 2024

I'm seeing this same behavior. Even when I set pidgin to away explicitly I still get no notifications on my phone. Even with WhatsApp Web running on the same machine (with this plug-in disabled) I still get notifications on my phone when the computer session is idle so WhatsApp Web seems to be detecting idle state and enabling the notifications on the phone.

Does this plug-in do anything positive in terms of notifying WhatsApp that it's away when it gets the away event from pidgin? If not then it doesn't seem surprising that WhatsApp always considers the pidgin instance as active and suppresses the notifications elsewhere. Just a thought for investigation.

@jeremyp3
Copy link
Author

Hello,

to be more precise, in the module options in pidgin I checked: "send-receipt" as "on-interact".

so when I receive a message, the notification (without sound) is displayed on my phone, and disappears when I open the relevant conversation on pidgin

@hoehermann
Copy link
Owner

@brianjmurrell

Even when I set pidgin to away explicitly I still get no notifications on my phone.

That is indeed not intended behaviour, but I cannot reproduce the issue. It simply does not happen with my set-up, I am sorry. 😕

Does this plug-in do anything positive in terms of notifying WhatsApp that it's away when it gets the away event from pidgin?

Yes, that happens in gowhatsapp_set_presence. Save for the hack mentioned above, it is a simple forward.

@jeremyp3

when I receive a message, the notification (without sound) is displayed on my phone, and disappears when I open the relevant conversation on pidgin

That however is indeed the intended behaviour. The general idea is that you want to read a message only once: Either on the phone or Pidgin (WhatsApp Web), not both. Maybe one of the other send-receipt modes is more suitable for you? I like on-answer. 🙂

@brianjmurrell
Copy link

What is send-receipts exactly?

With native WhatsApp, there seems to be two receipts. One for when the message was delivered and one for when it was read.

[How] does send-receipts interact with either of those [exactly]?

@jeremyp3
Copy link
Author

in purple-go-whatsapp, "send-receipts" is used to change the message from distributed to read on the recipient's side

In my case, the "send-receipts" is set to "interaction with the conversation", so as long as I haven't opened the pidgin conversation, the message isn't marked as read by my recipient. That's why I don't understand why I don't have sound on my phone, but maybe that's normal whatsapp behavior...

@brianjmurrell
Copy link

What is the result of keeping a conversation tab open (but perhaps not focused because another tab is in focus) in the conversations window on Pidgin while, say, the screen is locked?

There are many different permutations here in fact:

  • Conversation tab open/focused/not focused
  • Session is idle (i.e. screen is locked)/not idle

I would suggest that the only time a conversation is marked read is when the conversation is open, focused and the screen is not locked. All other times the read flag is not set.

Perhaps When interacting with the conversation, or Never even are the only sane options for Send receipts.

I've set it to Never for the moment to see if I can get any sane behaviour from leaving the WhatsApp account logged into Pidgin[1] and still getting notifications elsewhere when away from my computer.

[1] At the moment, I have a hacky dbus monitoring script that actually completely logs me out of WhatsApp in Pidgin when my session goes idle. This seems to be the only reliable way of getting notifications on my phone when I am away from the computer. Granted I have not tried all of the Send receipts options yet, which is why I have swung the pendulum to the entire opposite direction with using Never.

@hoehermann
Copy link
Owner

I think we are talking about different things here:

Presence

WhatsApp presence corresponds to a Pidgin status:

  • WhatsApp Presence: You can be available and unavailable. As far as I can tell, there is no explicit offline state.
  • Pidgin Status: There are a lot of possible statuses. In the plug-in, I defined AVAILABLE, AWAY, and OFFLINE.

I mapped AVAILABLE to available, AWAY to unavailable and OFFLINE to a disconnect function.

Presence is what controls whether you get a notification on your phone or not. For an extreme solution, you may configure Pidgin to disconnect from WhatsApp when your computer is idle (Settings → State/Idle).

Receipts

By default, Pidgin has no mechanism for receipts at all. There is some kind of "this conversation has a new message which you did not see yet" mechanism which I use for the on-interact option. From my experience, it tends to behave erratically. on-answer is more reliable since a message will only be marked as read when you actually reply.

If a message was marked as read, it will not be considered for a notification on your phone. I am quite sure it even removes a notification that is currently shown, but it will not "un-play" a sound. Other messages might still trigger a notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
barren Cannot reproduce
Projects
None yet
Development

No branches or pull requests

3 participants