From 4074556b6f37b0d80ed0dca920f742524b3b66b5 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Mon, 10 Nov 2025 21:54:09 +0100 Subject: [PATCH] Fix rendering notifications if event ID is duplicated (#5711) --- .../matrix/impl/notification/RustNotificationService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationService.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationService.kt index c34ad62d26..59d95af05b 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationService.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationService.kt @@ -45,7 +45,7 @@ class RustNotificationService( } val items = notificationClient.getNotifications(requests) buildMap { - val eventIds = requests.flatMap { it.eventIds } + val eventIds = requests.flatMap { it.eventIds }.distinct() for (rawEventId in eventIds) { val roomId = RoomId(requests.find { it.eventIds.contains(rawEventId) }?.roomId!!) val eventId = EventId(rawEventId)