mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Merge commit 'f6b85b8f9a0b4ce162616e79045fb015a21b27da' into feature/5004_basis_update_element
* commit 'f6b85b8f9a0b4ce162616e79045fb015a21b27da': (40 commits) finish version++ version++ changelog.d: Upgrade MatrixSDK version ([v0.27.1](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.27.1)). completed code improvement fix 7646 opening the safari web view externally so that it will be able to share the cookies web view opened on tap + changelog added the cell, now I just need to implement the navigation to the web view completed Hide deactivate account if the auth property is present on the WK. Add changelogs Prevent mention crashes when room members are missing display names (objc interop) Prevent pill crashes when room members are missing display names (objc interop) Update introspect to the latest version, remove now duplicate `introspectCollectionView` Prepare for new sprint finish version++ Add missing changelog entry. version++ changelog.d: Upgrade MatrixSDK version ([v0.27.0](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.27.0)). ... # Conflicts: # Config/AppVersion.xcconfig # Podfile # Riot.xcodeproj/xcshareddata/xcschemes/Riot.xcscheme # Riot/Modules/SecureBackup/Setup/SecureBackupSetupCoordinator.swift # Riot/Modules/Settings/SettingsViewController.m # Riot/target.yml
This commit is contained in:
@@ -1513,68 +1513,6 @@
|
||||
[self _createAccountWithCredentials:credentials];
|
||||
}
|
||||
|
||||
- (void)attemptDeviceRehydrationWithKeyData:(NSData *)keyData
|
||||
credentials:(MXCredentials *)credentials
|
||||
{
|
||||
[self attemptDeviceRehydrationWithKeyData:keyData
|
||||
credentials:credentials
|
||||
retry:YES];
|
||||
}
|
||||
|
||||
- (void)attemptDeviceRehydrationWithKeyData:(NSData *)keyData
|
||||
credentials:(MXCredentials *)credentials
|
||||
retry:(BOOL)retry
|
||||
{
|
||||
MXLogDebug(@"[MXKAuthenticationViewController] attemptDeviceRehydration: starting device rehydration");
|
||||
|
||||
if (keyData == nil)
|
||||
{
|
||||
MXLogError(@"[MXKAuthenticationViewController] attemptDeviceRehydration: no key provided for device rehydration");
|
||||
[self _createAccountWithCredentials:credentials];
|
||||
return;
|
||||
}
|
||||
|
||||
MXRestClient *mxRestClient = [[MXRestClient alloc] initWithCredentials:credentials andOnUnrecognizedCertificateBlock:^BOOL(NSData *certificate) {
|
||||
return NO;
|
||||
} andPersistentTokenDataHandler:^(void (^handler)(NSArray<MXCredentials *> *credentials, void (^completion)(BOOL didUpdateCredentials))) {
|
||||
[[MXKAccountManager sharedManager] readAndWriteCredentials:handler];
|
||||
} andUnauthenticatedHandler: nil];
|
||||
|
||||
MXWeakify(self);
|
||||
[[MXKAccountManager sharedManager].dehydrationService rehydrateDeviceWithMatrixRestClient:mxRestClient dehydrationKey:keyData success:^(NSString * deviceId) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
if (deviceId)
|
||||
{
|
||||
MXLogDebug(@"[MXKAuthenticationViewController] attemptDeviceRehydration: device %@ rehydrated successfully.", deviceId);
|
||||
credentials.deviceId = deviceId;
|
||||
}
|
||||
else
|
||||
{
|
||||
MXLogDebug(@"[MXKAuthenticationViewController] attemptDeviceRehydration: device rehydration has been canceled.");
|
||||
}
|
||||
|
||||
[self _createAccountWithCredentials:credentials];
|
||||
} failure:^(NSError *error) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
if (retry)
|
||||
{
|
||||
MXLogErrorDetails(@"[MXKAuthenticationViewController] attemptDeviceRehydration: device rehydration failed due to error: Retrying", @{
|
||||
@"error": error ?: @"unknown"
|
||||
});
|
||||
[self attemptDeviceRehydrationWithKeyData:keyData credentials:credentials retry:NO];
|
||||
return;
|
||||
}
|
||||
|
||||
MXLogErrorDetails(@"[MXKAuthenticationViewController] attemptDeviceRehydration: device rehydration failed due to error", @{
|
||||
@"error": error ?: @"unknown"
|
||||
});
|
||||
|
||||
[self _createAccountWithCredentials:credentials];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)_createAccountWithCredentials:(MXCredentials *)credentials
|
||||
{
|
||||
MXKAccount *account = [[MXKAccount alloc] initWithCredentials:credentials];
|
||||
|
||||
Reference in New Issue
Block a user