tigase/beagle-im

Unwanted notifications for already read messages on startup

truenicoco opened this issue · 5 comments

Is your feature request related to a problem? Please describe.
When Beagle is launched, it displays notifications for messages that were already read with other clients.
They are correctly recognized as "read" in the chat list though.

Describe the solution you'd like
When synchronizing messages from the archive, Beagle should wait to see if there is a read marker for a message before sending a notifications.

Describe alternatives you've considered
I'm used to just clearing all notifications on beagle launch since there are way too many.

Additional context
I don't use beagle that often, so when I launch it, it produces hundreds of notifications. It's a minor annoyance, but it would be nicer if notifications on launch were actually useful.

The code, to wait for the synchronization of MAM before creating notifications is already part of BeagleIM. Could you check what kind of notifications are shown which shouldn't be? i

  • are those from MUC chats? or 1-1 chats?
  • are those messages with attachments?
  • do those messages have a stable stanza-id?

Both 1:1 and MUCs. MUC messages should have a stanza-id.

I just reproduced with 1:1 this way, both accounts on a prosody server with MAM enabled:

  • Receive a 1:1 message, launch dino after. On startup, the "1" (unread msg) appear on the chat list+the notification: that's fine
  • Receive a 1:1 message, read it from Conversations, launch dino after. On startup, the "1" (unread msg) appear on the chat list very briefly then disappear+the notification stays.

So it really looks like Beagle sends the notifications, THEN finally realize get the displayed marker from MAM. At this point it updates the unread count in the chat list view, but it's too late, the notification was already sent.

Beagle delays sending notifications for incoming messages until MAM sychronization is finished.

Could you grab XML logs when this happens and share with us? Either here or by sending an email at support@tigase.net with attached XML logs, so I could review the order of messages and check what could possibly go wrong.

I tried to grab an XML log, but the bug only occurs on Beagle startup, and I don't have time to open the XML console before the notif shows up... I try disabling/re-enabling the account from the preferences UI, but in this case it seems the 'wait for MAM sync' behaviour is actually respected.

'wait for MAM sync' is always respected. There is no difference between enabling an account or starting the app.