mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
RoomDataSource: Now compute encryption trust level from trusted devices percentage in room.
This commit is contained in:
@@ -238,18 +238,18 @@
|
||||
|
||||
// If user belongs to the room refresh the trust level
|
||||
if (roomMember)
|
||||
{
|
||||
[self.room trustedMembersProgressWithSuccess:^(NSProgress *trustedMembersProgress) {
|
||||
{
|
||||
[self.room trustLevelSummaryWithSuccess:^(MXUsersTrustLevelSummary *usersTrustLevelSummary) {
|
||||
|
||||
RoomEncryptionTrustLevel roomEncryptionTrustLevel;
|
||||
|
||||
double trustedMembersPercentage = trustedMembersProgress.fractionCompleted;
|
||||
double trustedDevicesPercentage = usersTrustLevelSummary.trustedDevicesProgress.fractionCompleted;
|
||||
|
||||
if (trustedMembersPercentage >= 1.0)
|
||||
if (trustedDevicesPercentage >= 1.0)
|
||||
{
|
||||
roomEncryptionTrustLevel = RoomEncryptionTrustLevelTrusted;
|
||||
}
|
||||
else if (trustedMembersPercentage == 0.0)
|
||||
else if (trustedDevicesPercentage == 0.0)
|
||||
{
|
||||
roomEncryptionTrustLevel = RoomEncryptionTrustLevelNormal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user