mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.21k stars 170 forks source link

Presence always shows online in Whatsapp #640

Open satchafunkilus opened 11 months ago

satchafunkilus commented 11 months ago

If I toggle on the presence brigding, my status in Whatsapp is always shown as online, it will never go back to offline.

Even if I disable presence bridging and only enable send_presence_on_typing, as soon as I start typing once, my status in Whatsapp will toggle to Online and never switch back. Is there anything I am missing here?

Tycho-S commented 8 months ago

I've seen this issue since 0.10.2, in 0.10.0 it worked fine strange enough. I did the upgrade in early October through the famous ansible playbook.

Since 0.10.2 my contacts complained that I had been on "Last seen: 2 days ago" while I was sending them messages. I toggled presence off and back on (it had always been on!) and like @satchafunkilus says, I then got the issue that I am always on online status.

I've turned off presence in Whatsapp now altogether because it's very confusing for my contacts. It would be really great if this could be fixed 🙏

Some indication might be that it worked fine in 0.10.0 and no longer in 0.10.2. Though it could of couse also be that whatsapp changed something in whatsapp web. This kind of integration is an everlasting game of catching up...

Edit: I see I have 0.10.3 now and the problem is still there but it started in 0.10.2. If I can find a way to revert I will try that, to see if that fixes it. But I don't want to mess up my complex ansible install :) Because I don't understand it well enough to be honest.

Tycho-S commented 8 months ago

Update: I downgraded my Whatsapp bot to version 0.10.0 (it was as easy as changing one line in the ansible playbook) and the presence bridging works again! So it's something that has changed in the bot and not in Whatsapp Web itself.

As soon as I close the window of element I see it dropping the online status <3 Just the way it's supposed to work. In 0.10.2 and 0.10.3 it sticks in online status.

So whatever happened between 0.10.0 and 0.10.2 it broke the presence bridging somehow.

tulir commented 8 months ago

Presence bridging is very low priority and probably won't be fixed (at least not before it's fixed in the Matrix spec), but make sure you have ephemeral_events enabled in the config and appservice registration file

Tycho-S commented 8 months ago

Thanks @tulir, I will try that with the 0.10.3 config to see if that fixes the issue for me! If that fixes it I'll tell the ansible workbook maintainers so they can enable that. Because I see this setting is currently off in their default config.

And yeah, I think especially explicit presence is a major missing thing in the matrix spec. They are positioning it now as a MS Teams / Slack alternative but in all those platforms you can manually choose if you want to be seen as available whereas Matrix only allows you to do it automatically :( I hope they fix that soon.