mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
cbe555009b
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.