Merge branch 'gil/6663-MSC3771_read_receipts_for_threads' into gil/6664-MSC3773_notifications_for_threads

This commit is contained in:
Gil Eluard
2022-11-03 13:35:01 +01:00
130 changed files with 1860 additions and 683 deletions
@@ -952,7 +952,10 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
{
// Force a reload of device keys at the next session start.
// This will fix potential UISIs other peoples receive for our messages.
[mxSession.crypto resetDeviceKeys];
if ([mxSession.crypto isKindOfClass:[MXLegacyCrypto class]])
{
[(MXLegacyCrypto *)mxSession.crypto resetDeviceKeys];
}
// Clean other stores
[mxSession.scanManager deleteAllAntivirusScans];
@@ -1743,8 +1746,18 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
return;
}
if (![mxSession.crypto.crossSigning isKindOfClass:[MXLegacyCrossSigning class]]) {
MXLogFailure(@"Device dehydratation is currently only supported by legacy cross signing, add support to all implementations");
if (failure)
{
failure(nil);
}
return;
}
MXLegacyCrossSigning *crossSigning = (MXLegacyCrossSigning *)mxSession.crypto.crossSigning;;
MXLogDebug(@"[MXKAccount] attemptDeviceDehydrationWithRetry: starting device dehydration");
[[MXKAccountManager sharedManager].dehydrationService dehydrateDeviceWithMatrixRestClient:mxRestClient crypto:mxSession.crypto dehydrationKey:keyData success:^(NSString *deviceId) {
[[MXKAccountManager sharedManager].dehydrationService dehydrateDeviceWithMatrixRestClient:mxRestClient crossSigning:crossSigning dehydrationKey:keyData success:^(NSString *deviceId) {
MXLogDebug(@"[MXKAccount] attemptDeviceDehydrationWithRetry: device successfully dehydrated");
if (success)