mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
feat(crypto): Support for new UtdCause for historical messages
This commit is contained in:
parent
61ad718007
commit
52463cdf8f
@ -1035,6 +1035,7 @@
|
||||
"test_language_identifier" = "en";
|
||||
"test_untranslated_default_language_identifier" = "en";
|
||||
"timeline_decryption_failure_historical_event_no_key_backup" = "Historical messages are not available on this device";
|
||||
"timeline_decryption_failure_historical_event_unverified_device" = "You need to verify this device for access to historical messages";
|
||||
"timeline_decryption_failure_historical_event_user_not_joined" = "You don't have access to this message";
|
||||
"timeline_decryption_failure_unable_to_decrypt" = "Unable to decrypt message";
|
||||
"timeline_decryption_failure_withheld_unverified" = "This message was blocked either because you did not verify your device or because the sender needs to verify your identity.";
|
||||
|
@ -2592,6 +2592,8 @@ internal enum L10n {
|
||||
internal static var testUntranslatedDefaultLanguageIdentifier: String { return L10n.tr("Localizable", "test_untranslated_default_language_identifier") }
|
||||
/// Historical messages are not available on this device
|
||||
internal static var timelineDecryptionFailureHistoricalEventNoKeyBackup: String { return L10n.tr("Localizable", "timeline_decryption_failure_historical_event_no_key_backup") }
|
||||
/// You need to verify this device for access to historical messages
|
||||
internal static var timelineDecryptionFailureHistoricalEventUnverifiedDevice: String { return L10n.tr("Localizable", "timeline_decryption_failure_historical_event_unverified_device") }
|
||||
/// You don't have access to this message
|
||||
internal static var timelineDecryptionFailureHistoricalEventUserNotJoined: String { return L10n.tr("Localizable", "timeline_decryption_failure_historical_event_user_not_joined") }
|
||||
/// Unable to decrypt message
|
||||
|
@ -18,7 +18,8 @@ struct EncryptedRoomTimelineView: View {
|
||||
case .unknown:
|
||||
return \.time
|
||||
case .sentBeforeWeJoined,
|
||||
.historicalMessage,
|
||||
.historicalMessageAndBackupDisabled,
|
||||
.historicalMessageAndDeviceIsUnverified,
|
||||
.verificationViolation,
|
||||
.insecureDevice,
|
||||
.witheldBySender,
|
||||
|
@ -19,7 +19,8 @@ struct EncryptedRoomTimelineItem: EventBasedTimelineItemProtocol, Equatable {
|
||||
case verificationViolation
|
||||
case insecureDevice
|
||||
case unknown
|
||||
case historicalMessage
|
||||
case historicalMessageAndBackupDisabled
|
||||
case historicalMessageAndDeviceIsUnverified
|
||||
case witheldBySender
|
||||
case withheldForUnverifiedOrInsecureDevice
|
||||
}
|
||||
|
@ -153,9 +153,12 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
case .sentBeforeWeJoined:
|
||||
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .sentBeforeWeJoined)
|
||||
errorLabel = L10n.commonUnableToDecryptNoAccess
|
||||
case .historicalMessageAndBackupIsDisabled, .historicalMessageAndDeviceIsUnverified:
|
||||
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .historicalMessage)
|
||||
case .historicalMessageAndBackupIsDisabled:
|
||||
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .historicalMessageAndBackupDisabled)
|
||||
errorLabel = L10n.timelineDecryptionFailureHistoricalEventNoKeyBackup
|
||||
case .historicalMessageAndDeviceIsUnverified:
|
||||
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .historicalMessageAndDeviceIsUnverified)
|
||||
errorLabel = L10n.timelineDecryptionFailureHistoricalEventUnverifiedDevice
|
||||
case .withheldForUnverifiedOrInsecureDevice:
|
||||
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .withheldForUnverifiedOrInsecureDevice)
|
||||
errorLabel = L10n.timelineDecryptionFailureWithheldUnverified
|
||||
|
Loading…
x
Reference in New Issue
Block a user