Skip to content

Commit 6416c79

Browse files
authored
Fix rendering notifications if event ID is duplicated (#5711)
1 parent 8603d54 commit 6416c79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class RustNotificationService(
4545
}
4646
val items = notificationClient.getNotifications(requests)
4747
buildMap {
48-
val eventIds = requests.flatMap { it.eventIds }
48+
val eventIds = requests.flatMap { it.eventIds }.distinct()
4949
for (rawEventId in eventIds) {
5050
val roomId = RoomId(requests.find { it.eventIds.contains(rawEventId) }?.roomId!!)
5151
val eventId = EventId(rawEventId)

0 commit comments

Comments
 (0)