mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-18 21:52:18 +02:00
Merge pull request #7304 from vector-im/andy/tracking_changes
Ensure E2EE never tracks UnknownError
This commit is contained in:
@@ -16,12 +16,10 @@
|
||||
|
||||
import AnalyticsEvents
|
||||
|
||||
/// Failure reasons as defined in https://docs.google.com/document/d/1es7cTCeJEXXfRCTRgZerAM2Wg5ZerHjvlpfTW-gsOfI.
|
||||
@objc enum DecryptionFailureReason: Int {
|
||||
case unspecified
|
||||
case olmKeysNotSent
|
||||
case olmIndexError
|
||||
case unexpected
|
||||
|
||||
var errorName: AnalyticsEvent.Error.Name {
|
||||
switch self {
|
||||
@@ -31,8 +29,6 @@ import AnalyticsEvents
|
||||
return .OlmKeysNotSentError
|
||||
case .olmIndexError:
|
||||
return .OlmIndexError
|
||||
case .unexpected:
|
||||
return .UnknownError
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,12 +105,9 @@ NSString *const kDecryptionFailureTrackerAnalyticsCategory = @"e2e.failure";
|
||||
reason = DecryptionFailureReasonOlmIndexError;
|
||||
break;
|
||||
|
||||
case MXDecryptingErrorEncryptionNotEnabledCode:
|
||||
case MXDecryptingErrorUnableToDecryptCode:
|
||||
reason = DecryptionFailureReasonUnexpected;
|
||||
break;
|
||||
|
||||
default:
|
||||
// All other error codes will be tracked as `OlmUnspecifiedError` and will include `context` containing
|
||||
// the actual error code and localized description
|
||||
reason = DecryptionFailureReasonUnspecified;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@ extension __MXCallHangupReason {
|
||||
switch self {
|
||||
case .userHangup:
|
||||
return .VoipUserHangup
|
||||
case .userBusy:
|
||||
// There is no dedicated analytics event for `userBusy` error
|
||||
return .UnknownError
|
||||
case .inviteTimeout:
|
||||
return .VoipInviteTimeout
|
||||
case .iceFailed:
|
||||
@@ -32,6 +35,9 @@ extension __MXCallHangupReason {
|
||||
case .unknownError:
|
||||
return .UnknownError
|
||||
default:
|
||||
MXLog.failure("Unknown or unhandled hangup reason", context: [
|
||||
"reason": rawValue
|
||||
])
|
||||
return .UnknownError
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Analytics: Ensure E2EE never tracks UnknownError
|
||||
Reference in New Issue
Block a user