Return an empty list instead of crashing when calling participantAcis.

This commit is contained in:
Alex Hart
2025-04-17 16:21:30 -03:00
committed by Cody Henthorne
parent d2f44fee87
commit 6ce01c6b0e

View File

@@ -294,8 +294,9 @@ class Recipient(
/** The [ACI]'s of the members if this recipient is a group, otherwise empty. */
val participantAcis: List<ServiceId>
get() {
check(groupRecord.isPresent)
return groupRecord.get().requireV2GroupProperties().getMemberServiceIds().toImmutableList()
return groupRecord
.map { it.requireV2GroupProperties().getMemberServiceIds().toImmutableList() }
.orElse(emptyList<ServiceId>().toImmutableList())
}
/** The [RegisteredState] of this recipient. Signal groups/lists are always registered. */