feat: add displayname and homeserver migration to legacy (MESSENGER-7565)

This commit is contained in:
Frank Rotermund
2025-09-23 16:00:30 +02:00
parent 821e8a4563
commit 3f124ef1ce
5 changed files with 159 additions and 0 deletions
@@ -1894,6 +1894,21 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
MXSession* session = [self mxSession];
if(!session)
return;
// bwi #7565 as we have a session here and its a migration step -> use the migrationAssistant here
MigrationAssistant *migrationAssistant = [[MigrationAssistant alloc] init];
BOOL retVal = [migrationAssistant storeDisplaynameWithSession:session];
if ( retVal == false) {
MXLogError(@"[RecentsDataSource] shouldShowFeatureBanner could not store displaname for migration")
}
retVal = [migrationAssistant storeHomeserverWithSession:session];
if ( retVal == false) {
MXLogError(@"[RecentsDataSource] shouldShowFeatureBanner could not store homeserver for migration")
}
FeatureBannerVisibilityService *featureBannerService = [FeatureBannerVisibilityService alloc];
[featureBannerService isUnreadWithCompletion: ^(BOOL unread) {
if (unread) {