Crypto: Add telemetry for events unable to decrypt (UTDs)

Add a dispatch method
This commit is contained in:
manuroe 2018-06-29 07:50:06 +02:00
parent b6ce79303a
commit dcc1435d82
3 changed files with 11 additions and 0 deletions

View file

@ -46,6 +46,11 @@
*/
- (void)reportUnableToDecryptErrorForEvent:(MXEvent*)event withRoomState:(MXRoomState*)roomState myUser:(NSString*)userId;
/**
Flush current data.
*/
- (void)dispatch;
@end
/**

View file

@ -99,6 +99,11 @@
reportedFailures[event.eventId] = decryptionFailure;
}
- (void)dispatch
{
[self checkFailures];
}
#pragma mark - Private methods
/**

View file

@ -559,6 +559,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
_isAppForeground = NO;
// Analytics: Force to send the pending actions
[[DecryptionFailureTracker sharedInstance] dispatch];
[[Analytics sharedInstance] dispatch];
}