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:
+2
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user