Fixed cross-signing detection in LegacyAppDelegate

This commit is contained in:
Gil Eluard 2021-01-28 11:32:54 +01:00
parent fabef31ac1
commit dbc1c69f95

View file

@ -3734,7 +3734,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
@(pendingKeyRequests.count),
self->roomKeyRequestViewController ? @"YES" : @"NO");
if (!mxSession.crypto.crossSigning)
if (!mxSession.crypto.crossSigning || mxSession.crypto.crossSigning.state != MXCrossSigningStateCrossSigningExists)
{
if (self->roomKeyRequestViewController)
{
@ -3770,7 +3770,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
MXDeviceInfo *deviceInfo = [usersDevicesInfoMap objectForDevice:deviceId forUser:userId];
if (deviceInfo)
{
if (!mxSession.crypto.crossSigning)
if (!mxSession.crypto.crossSigning || mxSession.crypto.crossSigning.state != MXCrossSigningStateCrossSigningExists)
{
BOOL wasNewDevice = (deviceInfo.trustLevel.localVerificationStatus == MXDeviceUnknown);