Skip to content

Commit

Permalink
added cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Dec 4, 2024
1 parent 6582462 commit 7a7e46a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
analytics.trackError(context: nil, domain: .E2EE, name: .ExpectedDueToMembership, timeToDecryptMillis: timeToDecryptMs)
case .historicalMessage:
analytics.trackError(context: nil, domain: .E2EE, name: .HistoricalMessage, timeToDecryptMillis: timeToDecryptMs)
case .withheldForUnverifiedOrInsecureDevice:
analytics.trackError(context: nil, domain: .E2EE, name: .RoomKeysWithheldForUnverifiedDevice, timeToDecryptMillis: timeToDecryptMs)
case .withheldBySender:
analytics.trackError(context: nil, domain: .E2EE, name: .UnknownError, timeToDecryptMillis: timeToDecryptMs)
}
}
.store(in: &cancellables)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ struct EncryptedRoomTimelineView: View {
case .sentBeforeWeJoined,
.historicalMessage,
.verificationViolation,
.insecureDevice:
.insecureDevice,
.witheldBySender,
.withheldForUnverifiedOrInsecureDevice:
return \.block
}
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ struct EncryptedRoomTimelineItem: EventBasedTimelineItemProtocol, Equatable {
case insecureDevice
case unknown
case historicalMessage
case witheldBySender
case withheldForUnverifiedOrInsecureDevice
}

let id: TimelineItemIdentifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
case .historicalMessage:
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .historicalMessage)
errorLabel = L10n.timelineDecryptionFailureHistoricalEventNoKeyBackup
case .withheldForUnverifiedOrInsecureDevice:
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .withheldForUnverifiedOrInsecureDevice)
errorLabel = L10n.timelineDecryptionFailureWithheldUnverified
case .withheldBySender:
encryptionType = .megolmV1AesSha2(sessionID: sessionID, cause: .witheldBySender)
errorLabel = L10n.timelineDecryptionFailureWithheldUnverified
}
case .olmV1Curve25519AesSha2(let senderKey):
encryptionType = .olmV1Curve25519AesSha2(senderKey: senderKey)
Expand Down

0 comments on commit 7a7e46a

Please sign in to comment.