mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
feat(crypto): Support for new UtdCause for historical messages
This commit is contained in:
@@ -1035,6 +1035,7 @@
|
|||||||
"test_language_identifier" = "en";
|
"test_language_identifier" = "en";
|
||||||
"test_untranslated_default_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_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_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_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.";
|
"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") }
|
internal static var testUntranslatedDefaultLanguageIdentifier: String { return L10n.tr("Localizable", "test_untranslated_default_language_identifier") }
|
||||||
/// Historical messages are not available on this device
|
/// 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") }
|
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
|
/// 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") }
|
internal static var timelineDecryptionFailureHistoricalEventUserNotJoined: String { return L10n.tr("Localizable", "timeline_decryption_failure_historical_event_user_not_joined") }
|
||||||
/// Unable to decrypt message
|
/// Unable to decrypt message
|
||||||
|
|||||||
+2
-1
@@ -18,7 +18,8 @@ struct EncryptedRoomTimelineView: View {
|
|||||||
case .unknown:
|
case .unknown:
|
||||||
return \.time
|
return \.time
|
||||||
case .sentBeforeWeJoined,
|
case .sentBeforeWeJoined,
|
||||||
.historicalMessage,
|
.historicalMessageAndBackupDisabled,
|
||||||
|
.historicalMessageAndDeviceIsUnverified,
|
||||||
.verificationViolation,
|
.verificationViolation,
|
||||||
.insecureDevice,
|
.insecureDevice,
|
||||||
.witheldBySender,
|
.witheldBySender,
|
||||||
|
|||||||
+2
-1
@@ -19,7 +19,8 @@ struct EncryptedRoomTimelineItem: EventBasedTimelineItemProtocol, Equatable {
|
|||||||
case verificationViolation
|
case verificationViolation
|
||||||
case insecureDevice
|
case insecureDevice
|
||||||
case unknown
|
case unknown
|
||||||
case historicalMessage
|
case historicalMessageAndBackupDisabled
|
||||||
|
case historicalMessageAndDeviceIsUnverified
|
||||||
case witheldBySender
|
case witheldBySender
|
||||||
case withheldForUnverifiedOrInsecureDevice
|
case withheldForUnverifiedOrInsecureDevice
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,9 +153,12 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
|||||||
case .sentBeforeWeJoined:
|
case .sentBeforeWeJoined:
|
||||||
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .sentBeforeWeJoined)
|
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .sentBeforeWeJoined)
|
||||||
errorLabel = L10n.commonUnableToDecryptNoAccess
|
errorLabel = L10n.commonUnableToDecryptNoAccess
|
||||||
case .historicalMessageAndBackupIsDisabled, .historicalMessageAndDeviceIsUnverified:
|
case .historicalMessageAndBackupIsDisabled:
|
||||||
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .historicalMessage)
|
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .historicalMessageAndBackupDisabled)
|
||||||
errorLabel = L10n.timelineDecryptionFailureHistoricalEventNoKeyBackup
|
errorLabel = L10n.timelineDecryptionFailureHistoricalEventNoKeyBackup
|
||||||
|
case .historicalMessageAndDeviceIsUnverified:
|
||||||
|
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .historicalMessageAndDeviceIsUnverified)
|
||||||
|
errorLabel = L10n.timelineDecryptionFailureHistoricalEventUnverifiedDevice
|
||||||
case .withheldForUnverifiedOrInsecureDevice:
|
case .withheldForUnverifiedOrInsecureDevice:
|
||||||
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .withheldForUnverifiedOrInsecureDevice)
|
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .withheldForUnverifiedOrInsecureDevice)
|
||||||
errorLabel = L10n.timelineDecryptionFailureWithheldUnverified
|
errorLabel = L10n.timelineDecryptionFailureWithheldUnverified
|
||||||
|
|||||||
Reference in New Issue
Block a user