diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt index d061b91205..6d1b02a2fe 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt @@ -120,15 +120,29 @@ class RoomProfileController @Inject constructor( } var encryptionMisconfigured = false - val learnMoreSubtitle = if (roomSummary.isEncrypted) { + val e2eInfoText = if (roomSummary.isEncrypted) { if (roomSummary.roomEncryptionAlgorithm is RoomEncryptionAlgorithm.SupportedAlgorithm) { - if (roomSummary.isDirect) R.string.direct_room_profile_encrypted_subtitle else R.string.room_profile_encrypted_subtitle + stringProvider.getString( + if (roomSummary.isDirect) R.string.direct_room_profile_encrypted_subtitle + else R.string.room_profile_encrypted_subtitle + ) } else { encryptionMisconfigured = true - if (roomSummary.isDirect) R.string.direct_room_profile_encrypted_misconfigured_subtitle else R.string.room_profile_encrypted_misconfigured_subtitle + buildString { + append(stringProvider.getString(R.string.encryption_has_been_misconfigured)) + append(" ") + apply { + if (!data.canUpdateRoomState) { + append(stringProvider.getString(R.string.contact_admin_to_restore_encryption)) + } + } + } } } else { - if (roomSummary.isDirect) R.string.direct_room_profile_not_encrypted_subtitle else R.string.room_profile_not_encrypted_subtitle + stringProvider.getString( + if (roomSummary.isDirect) R.string.direct_room_profile_not_encrypted_subtitle + else R.string.room_profile_not_encrypted_subtitle + ) } genericFooterItem { id("e2e info") @@ -143,7 +157,7 @@ class RoomProfileController @Inject constructor( +" " } } - +host.stringProvider.getString(learnMoreSubtitle) + +e2eInfoText } ) } diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index bfd9d8172a..c9adbc9d4a 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2792,8 +2792,8 @@ Messages in this room are not end-to-end encrypted. Messages here are not end-to-end encrypted. Messages in this room are end-to-end encrypted.\n\nYour messages are secured with locks and only you and the recipient have the unique keys to unlock them. - Encryption has been misconfigured. Please contact an admin to restore the room to a valid state. - Encryption has been misconfigured. Please contact an admin to restore room. + Encryption has been misconfigured. + Please contact an admin to restore encryption to a valid state. Messages here are end-to-end encrypted.\n\nYour messages are secured with locks and only you and the recipient have the unique keys to unlock them. Security Restore Encryption