element-web
element-web copied to clipboard
Popup notification for the same historical message each time I view the room in a fresh session
Steps to reproduce
- Open Element Desktop
- Review rooms as normal
- Eventually some time later open one specific room
- See a notification for a (threaded, with mention) message from a month ago
- This repeats each time I do these steps, it does not resend if I go out and back into the room within the same session.
Outcome
What did you expect?
Messages should only ever notify me once, and ideally never if they are old messages.
What happened instead?
I am being repeatedly notified for the same message
Operating system
Arch Linux
Application version
Element Nightly version: 2025051601 Crypto version: Rust SDK 0.11.0 (f2e32d4), Vodozemac 0.9.0
How did you install the app?
pacman
Homeserver
half-shot.uk
Will you send logs?
Yes
Debugging:
- This fires via the onEventDecrypted handler (https://github.com/vector-im/riot-web/blob/aa821a5b6fbe291fafaf232849dd23e57a39a1e7/src/Notifier.ts#L416-L425)
- This appears to fire as a side effect of the reply chain being evaluated
-
this.pendingEncryptedEventIdsgates the decryption listener, so that only "recent" events are handled as this array is appended to by theonEventhandler. -
IRoomTimelineData.liveEventis set astrueon this event from ages ago.
Call stack:
Culprit:
Looks like addEventToTimeline sets liveEvent as true, which is because toStartOfTimeline is false, the timeline is the live timeline and the event was not from the cache.
Good debugging: seems like the 'live' and 'to start' concepts have got confused: possibly it needs to be split out into its own param.