Files
element-x-android/libraries/push
hayaksi1 cbe555009b Stop repeating messages that are already shown in a room notification
A room notification is rebuilt from the one currently on screen: its messaging
style is extracted and the incoming events are appended. Every event was
appended unconditionally, so an event re-delivered while its notification was
still showing was added again, and the notification re-alerted each time.

Skip events whose id is already present in the existing messaging style, and
set onlyAlertOnce when the batch adds nothing new. Smart reply failures are
exempt, because that path deliberately reuses the same synthesised event id to
append the "message not sent" line. Filtering is per event rather than per
message so an image and its caption stay a unit.

This fixes the visible duplication, not the re-delivery that triggers it, and
does not help once the notification has been dismissed.
2026-08-09 15:09:59 +03:00
..