Prevent show empty conversations as end to end encrypted and trusted

This commit is contained in:
Sylvain Berfini 2025-01-16 13:49:19 +01:00
parent d0c733e81b
commit 9504c6d1ca

View file

@ -115,8 +115,13 @@ class ContactAvatarModel
else -> SecurityLevel.None
}*/
var lowestSecurityLevel = SecurityLevel.EndToEndEncryptedAndVerified
for (participant in chatRoom.participants) {
val participants = chatRoom.participants
var lowestSecurityLevel = if (participants.isEmpty()) {
SecurityLevel.None
} else {
SecurityLevel.EndToEndEncryptedAndVerified
}
for (participant in participants) {
val avatar = coreContext.contactsManager.getContactAvatarModelForAddress(
participant.address
)