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

Do not reset device keys if migrating to CryptoSDK #7369

Merged
merged 1 commit into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 3 additions & 2 deletions Riot/Modules/MatrixKit/Models/Account/MXKAccount.m
Original file line number Diff line number Diff line change
Expand Up @@ -947,9 +947,10 @@ - (void)closeSession:(BOOL)clearStore

if (clearStore)
{
// Force a reload of device keys at the next session start.
// Force a reload of device keys at the next session start, unless we are just about to migrate
// all data and device keys into CryptoSDK.
// This will fix potential UISIs other peoples receive for our messages.
if ([mxSession.crypto isKindOfClass:[MXLegacyCrypto class]])
if ([mxSession.crypto isKindOfClass:[MXLegacyCrypto class]] && !MXSDKOptions.sharedInstance.enableCryptoSDK)
{
[(MXLegacyCrypto *)mxSession.crypto resetDeviceKeys];
}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-7369.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not reset device keys if migrating to CryptoSDK