Add tap/click event. Improve Swift/ObjC bridging.

This commit is contained in:
Doug
2021-12-08 12:49:57 +00:00
parent 6001c9f0f5
commit 02744b7577
10 changed files with 89 additions and 91 deletions
@@ -91,31 +91,32 @@ NSString *const kDecryptionFailureTrackerAnalyticsCategory = @"e2e.failure";
return;
}
DecryptionFailure *decryptionFailure = [[DecryptionFailure alloc] init];
decryptionFailure.failedEventId = event.eventId;
NSString *failedEventId = event.eventId;
DecryptionFailureReason reason;
// Categorise the error
switch (event.decryptionError.code)
{
case MXDecryptingErrorUnknownInboundSessionIdCode:
decryptionFailure.reason = DecryptionFailureReasonOlmKeysNotSent;
reason = DecryptionFailureReasonOlmKeysNotSent;
break;
case MXDecryptingErrorOlmCode:
decryptionFailure.reason = DecryptionFailureReasonOlmIndexError;
reason = DecryptionFailureReasonOlmIndexError;
break;
case MXDecryptingErrorEncryptionNotEnabledCode:
case MXDecryptingErrorUnableToDecryptCode:
decryptionFailure.reason = DecryptionFailureReasonUnexpected;
reason = DecryptionFailureReasonUnexpected;
break;
default:
decryptionFailure.reason = DecryptionFailureReasonUnspecified;
reason = DecryptionFailureReasonUnspecified;
break;
}
reportedFailures[event.eventId] = decryptionFailure;
reportedFailures[event.eventId] = [[DecryptionFailure alloc] initWithFailedEventId:failedEventId
reason:reason];
}
- (void)dispatch