Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide the session verification based on the secure storage (#486) #494

Merged
merged 2 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Riot/Modules/Application/LegacyAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -3574,6 +3574,8 @@ - (void)disableNoVoIPOnMatrixSession:(MXSession*)mxSession

- (void)checkCrossSigningForSession:(MXSession*)mxSession
{
// Tchap: Disable Cross Signing Managment.
#ifdef SUPPORT_KEYS_BACKUP
if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive)
{
MXLogDebug(@"[AppDelegate] checkCrossSigningForSession called while the app is not active. Ignore it.");
Expand Down Expand Up @@ -3606,6 +3608,7 @@ - (void)checkCrossSigningForSession:(MXSession*)mxSession
MXLogDebug(@"[AppDelegate] handleAppState: crossSigning.state: %@. Error: %@", @(mxSession.crypto.crossSigning.state), error);
}];
}
#endif
}


Expand Down Expand Up @@ -4248,6 +4251,8 @@ - (void)presentNewSignInAlertForDevice:(MXDevice*)device inSession:(MXSession*)s

- (void)registerDidChangeCrossSigningKeysNotificationForSession:(MXSession*)session
{
// Tchap: Disable Cross Signing Managment.
#ifdef SUPPORT_KEYS_BACKUP
MXCrossSigning *crossSigning = session.crypto.crossSigning;

if (!crossSigning)
Expand Down Expand Up @@ -4281,6 +4286,7 @@ - (void)registerDidChangeCrossSigningKeysNotificationForSession:(MXSession*)sess
[self.masterTabBarController presentVerifyCurrentSessionAlertIfNeededWithSession:session];
}
}];
#endif
}


Expand Down
6 changes: 6 additions & 0 deletions Riot/Modules/TabBar/MasterTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,8 @@ - (void)promptUserBeforeUsingAnalyticsForSession:(MXSession *)mxSession

- (void)presentVerifyCurrentSessionAlertIfNeededWithSession:(MXSession*)session
{
// Tchap: Disable Cross Signing Managment.
#ifdef SUPPORT_KEYS_BACKUP
if (RiotSettings.shared.hideVerifyThisSessionAlert
|| self.reviewSessionAlertHasBeenDisplayed
|| self.isOnboardingInProgress)
Expand All @@ -979,10 +981,13 @@ - (void)presentVerifyCurrentSessionAlertIfNeededWithSession:(MXSession*)session

self.reviewSessionAlertHasBeenDisplayed = YES;
[self presentVerifyCurrentSessionAlertWithSession:session];
#endif
}

- (void)presentVerifyCurrentSessionAlertWithSession:(MXSession*)session
{
// Tchap: Disable Cross Signing Managment.
#ifdef SUPPORT_KEYS_BACKUP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please uncomment "[[AppDelegate theDelegate] presentCompleteSecurityForSession:session];"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in last commit

MXLogDebug(@"[MasterTabBarController] presentVerifyCurrentSessionAlertWithSession");

[currentAlert dismissViewControllerAnimated:NO completion:nil];
Expand Down Expand Up @@ -1011,6 +1016,7 @@ - (void)presentVerifyCurrentSessionAlertWithSession:(MXSession*)session
[self presentViewController:alert animated:YES completion:nil];

currentAlert = alert;
#endif
}

- (void)presentReviewUnverifiedSessionsAlertIfNeededWithSession:(MXSession*)session
Expand Down
1 change: 1 addition & 0 deletions changelog.d/486.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hide the session verification based on the secure storage