convert DecryptionFailureTracker to swift + tests

This commit is contained in:
Valere
2024-03-29 11:03:28 +01:00
parent 3253271949
commit d045a32b74
9 changed files with 479 additions and 255 deletions
@@ -38,15 +38,16 @@ import AnalyticsEvents
/// The id of the event that was unabled to decrypt.
let failedEventId: String
/// The time the failure has been reported.
let ts: TimeInterval = Date().timeIntervalSince1970
let ts: TimeInterval
/// Decryption failure reason.
let reason: DecryptionFailureReason
/// Additional context of failure
let context: String
init(failedEventId: String, reason: DecryptionFailureReason, context: String) {
init(failedEventId: String, reason: DecryptionFailureReason, context: String, ts: TimeInterval) {
self.failedEventId = failedEventId
self.reason = reason
self.context = context
self.ts = ts
}
}