Fix rendering notifications if event ID is duplicated (#5711)

This commit is contained in:
SpiritCroc 2025-11-10 21:54:09 +01:00 committed by GitHub
parent 8603d54778
commit 6416c79925
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)