Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for new UtdCause for historical messages #3625

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down
2 changes: 2 additions & 0 deletions ElementX/Sources/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ struct EncryptedRoomTimelineView: View {
case .unknown:
return \.time
case .sentBeforeWeJoined,
.historicalMessage,
.historicalMessageAndBackupDisabled,
.historicalMessageAndDeviceIsUnverified,
.verificationViolation,
.insecureDevice,
.witheldBySender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ struct EncryptedRoomTimelineItem: EventBasedTimelineItemProtocol, Equatable {
case verificationViolation
case insecureDevice
case unknown
case historicalMessage
case historicalMessageAndBackupDisabled
case historicalMessageAndDeviceIsUnverified
case witheldBySender
case withheldForUnverifiedOrInsecureDevice
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading