mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 09:55:40 +03:00
Add encrypted event id only if not already in the list
This commit is contained in:
parent
da6b41c34d
commit
fdc28c0383
1 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,9 @@ class EncryptedReferenceAggregationProcessor @Inject constructor() {
|
||||||
) {
|
) {
|
||||||
event.eventId?.let { eventId ->
|
event.eventId?.let { eventId ->
|
||||||
val existingRelatedPoll = getPollSummaryWithEventId(realm, relatedEventId)
|
val existingRelatedPoll = getPollSummaryWithEventId(realm, relatedEventId)
|
||||||
existingRelatedPoll?.encryptedRelatedEventIds?.add(eventId)
|
if (eventId !in existingRelatedPoll?.encryptedRelatedEventIds.orEmpty()) {
|
||||||
|
existingRelatedPoll?.encryptedRelatedEventIds?.add(eventId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue