@@ -38,7 +38,8 @@ private data class DecryptionFailure(
3838 val failedEventId : String ,
3939 val error : MXCryptoError .ErrorType
4040)
41- private typealias DetailedErrorName = Pair <String , Error .Name >
41+ private typealias DetailedErrorName = Pair <String , Error .Name >
42+
4243private const val GRACE_PERIOD_MILLIS = 4_000
4344private const val CHECK_INTERVAL = 2_000L
4445
@@ -145,10 +146,11 @@ class DecryptionFailureTracker @Inject constructor(
145146 private fun MXCryptoError.ErrorType.toAnalyticsErrorName (): DetailedErrorName {
146147 val detailed = " $name | mxc_crypto_error_type"
147148 return when (this ) {
148- MXCryptoError .ErrorType .UNKNOWN_INBOUND_SESSION_ID -> Pair (detailed, Error .Name .OlmKeysNotSentError )
149- MXCryptoError .ErrorType .OLM -> Pair (detailed, Error .Name .OlmUnspecifiedError )
150- MXCryptoError .ErrorType .UNKNOWN_MESSAGE_INDEX -> Pair (detailed, Error .Name .OlmIndexError )
151- else -> Pair (detailed, Error .Name .UnknownError )
149+ MXCryptoError .ErrorType .UNKNOWN_INBOUND_SESSION_ID ,
150+ MXCryptoError .ErrorType .KEYS_WITHHELD -> Pair (detailed, Error .Name .OlmKeysNotSentError )
151+ MXCryptoError .ErrorType .OLM -> Pair (detailed, Error .Name .OlmUnspecifiedError )
152+ MXCryptoError .ErrorType .UNKNOWN_MESSAGE_INDEX -> Pair (detailed, Error .Name .OlmIndexError )
153+ else -> Pair (detailed, Error .Name .UnknownError )
152154 }
153155 }
154156}
0 commit comments