diff --git a/CHANGES_BWI.md b/CHANGES_BWI.md index 6dafe3ae9..20d7eefac 100644 --- a/CHANGES_BWI.md +++ b/CHANGES_BWI.md @@ -1,3 +1,26 @@ +Changes in BWI project 2.11.0 (2023-10-24) +=================================================== + +Upstream merge ✨: +- v1.11.4 + +Features ✨: + +Improvements 🙌: +- Corrected behaviour on errors in maintenance (#5031) +- Tracking of Rust encryption errors with matomo (#4956) +- Tracking of room size dimension for encryption errors (#4821) +- Use content scanner upload size correctly for all file types (#4433) + +Bugfix 🐛: +- Crashfix notes room favorite check (#5240) + +Translations 🗣 : + +SDK API changes ⚠️: + +Build 🧱: + Changes in BWI project 2.10.0 (2023-09-26) =================================================== diff --git a/Config/BWIBuildSettings.swift b/Config/BWIBuildSettings.swift index eee2dff80..c83455fe4 100644 --- a/Config/BWIBuildSettings.swift +++ b/Config/BWIBuildSettings.swift @@ -522,7 +522,7 @@ class BWIBuildSettings: NSObject { var forgotPasswordInformationAlert = true // MARK: Promote new feature within a banner below the navigation view - var showTopBanner = true + var showTopBanner = false var showCustomServerDisplayName = true var customServerDisplayName = "" @@ -690,6 +690,11 @@ class BWIBuildSettings: NSObject { // MARK: Content Scanner Status Thumbnail var showContentScannerStatusWithFilename = true + // MARK: Federation @UserDefault(key: UserDefaultsKeys.isFederationEnabled, defaultValue: false, storage: RiotSettings.defaults) var isFederationEnabled + + // shows the grey/green/red shield for the room avatar / user avatar + var showEncryptionStatusBadgeOnAvatar = false + } diff --git a/Config/BuM-Beta/BWIBuildSettings+BuM-Beta.swift b/Config/BuM-Beta/BWIBuildSettings+BuM-Beta.swift index bb6112246..91d51e637 100644 --- a/Config/BuM-Beta/BWIBuildSettings+BuM-Beta.swift +++ b/Config/BuM-Beta/BWIBuildSettings+BuM-Beta.swift @@ -24,7 +24,6 @@ extension BWIBuildSettings { secondaryAppName = "BundesMessenger" settingsScreenShowLabSettings = true authScreenShowRegister = true - showTopBanner = true bwiShowDeveloperSettings = true bwiPersonalState = true bwiMatomoTrackingDefaultState = false diff --git a/Riot/Assets/new_features.html b/Riot/Assets/new_features.html index e9332f9ff..3f4494ceb 100644 --- a/Riot/Assets/new_features.html +++ b/Riot/Assets/new_features.html @@ -26,6 +26,26 @@ +
+

+ Version 2.11.0 +

+ +

+ Verbesserungen +

+

+ +

+ Behobene Bugs +

+

+

Version 2.10.1 diff --git a/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift b/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift index a808a3d0d..a70b20860 100644 --- a/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift +++ b/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift @@ -83,9 +83,7 @@ final class HomeserverConfigurationBuilder: NSObject { var tileServerMapStyleURL: URL = URL(string: BWIBuildSettings.shared.serverConfigDefaultMapstyleURLString)! if let mapStyleURLString = wellKnown?.tileServer?.mapStyleURLString, let mapStyleURL = URL(string: mapStyleURLString) { - if verifyUrl(url: mapStyleURL) { - tileServerMapStyleURL = mapStyleURL - } + tileServerMapStyleURL = mapStyleURL } let tileServerConfiguration = HomeserverTileServerConfiguration(mapStyleURL: tileServerMapStyleURL) diff --git a/Riot/Modules/Application/LegacyAppDelegate.m b/Riot/Modules/Application/LegacyAppDelegate.m index 74e09c072..3a617e915 100644 --- a/Riot/Modules/Application/LegacyAppDelegate.m +++ b/Riot/Modules/Application/LegacyAppDelegate.m @@ -270,13 +270,17 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni [[AppConfiguration new] setupSettings]; MXLogConfiguration *configuration = [[MXLogConfiguration alloc] init]; +#if DEBUG configuration.logLevel = MXLogLevelVerbose; - configuration.logFilesSizeLimit = 100 * 1024 * 1024; // 100MB - configuration.maxLogFilesCount = 50; +#else + configuration.logLevel = MXLogLevelNone; +#endif + configuration.logFilesSizeLimit = 0; // 100MB + configuration.maxLogFilesCount = 0; // Redirect NSLogs to files only if we are not debugging if (!isatty(STDERR_FILENO)) { - configuration.redirectLogsToFiles = YES; + configuration.redirectLogsToFiles = NO; } [MXLog configure:configuration]; diff --git a/Riot/Modules/Common/Recents/RecentsViewController.m b/Riot/Modules/Common/Recents/RecentsViewController.m index e08f498e1..88f807d21 100644 --- a/Riot/Modules/Common/Recents/RecentsViewController.m +++ b/Riot/Modules/Common/Recents/RecentsViewController.m @@ -2494,12 +2494,6 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; }]]; - - [errorAlert addAction:[UIAlertAction actionWithTitle:[BWIL10n bwiOutdatedVersionLogoutButton] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { - [self logout]; - }]]; [self presentViewController:errorAlert animated:YES completion:nil]; } diff --git a/Riot/Modules/Contacts/Views/ContactTableViewCell.m b/Riot/Modules/Contacts/Views/ContactTableViewCell.m index 2689b9a16..acb25c4c9 100644 --- a/Riot/Modules/Contacts/Views/ContactTableViewCell.m +++ b/Riot/Modules/Contacts/Views/ContactTableViewCell.m @@ -232,15 +232,25 @@ - (void)refreshContactBadgeImage { NSString *matrixId = [self firstMatrixId]; - if (matrixId) + // bwi: #5236 remove encryption status shield + if (BWIBuildSettings.shared.showEncryptionStatusBadgeOnAvatar) { - [self.mxRoom encryptionTrustLevelForUserId:matrixId onComplete:^(UserEncryptionTrustLevel userEncryptionTrustLevel) { - self.avatarBadgeImageView.image = [EncryptionTrustLevelBadgeImageHelper userBadgeImageFor:userEncryptionTrustLevel]; - }]; + if (matrixId) + { + [self.mxRoom encryptionTrustLevelForUserId:matrixId onComplete:^(UserEncryptionTrustLevel userEncryptionTrustLevel) { + self.avatarBadgeImageView.image = [EncryptionTrustLevelBadgeImageHelper userBadgeImageFor:userEncryptionTrustLevel]; + }]; + } + else + { + self.avatarBadgeImageView.image = [EncryptionTrustLevelBadgeImageHelper userBadgeImageFor:UserEncryptionTrustLevelUnknown]; + } + self.avatarBadgeImageView.hidden = NO; } - else + else { - self.avatarBadgeImageView.image = [EncryptionTrustLevelBadgeImageHelper userBadgeImageFor:UserEncryptionTrustLevelUnknown]; + self.avatarBadgeImageView.image = nil; + self.avatarBadgeImageView.hidden = YES; } } diff --git a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m index 2583e8be0..641f46ca2 100644 --- a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m +++ b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m @@ -428,9 +428,17 @@ { self.roomMemberStatusLabel.text = @""; } - - self.roomMemberAvatarBadgeImageView.image = [EncryptionTrustLevelBadgeImageHelper userBadgeImageFor:self.encryptionTrustLevel]; - + // bwi: #5236 remove encryption status shield + if (BWIBuildSettings.shared.showEncryptionStatusBadgeOnAvatar) + { + self.roomMemberAvatarBadgeImageView.image = [EncryptionTrustLevelBadgeImageHelper userBadgeImageFor:self.encryptionTrustLevel]; + self.roomMemberAvatarBadgeImageView.hidden = NO; + } + else + { + self.roomMemberAvatarBadgeImageView.image = nil; + self.roomMemberAvatarBadgeImageView.hidden = YES; + } // Retrieve the existing direct chats [directChatsArray removeAllObjects]; NSArray *directRoomIds = self.mainSession.directRooms[self.mxRoomMember.userId]; diff --git a/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewModel.swift b/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewModel.swift index 01b78d41e..0e97ff21f 100644 --- a/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewModel.swift +++ b/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewModel.swift @@ -34,7 +34,13 @@ final class RoomInfoListViewModel: NSObject, RoomInfoListViewModelType { weak var coordinatorDelegate: RoomInfoListViewModelCoordinatorDelegate? private var viewData: RoomInfoListViewData { - let encryptionImage = EncryptionTrustLevelBadgeImageHelper.roomBadgeImage(for: room.summary.roomEncryptionTrustLevel()) + var encryptionImage: UIImage? + // bwi: #5236 remove encryption status shield + if BWIBuildSettings.shared.showEncryptionStatusBadgeOnAvatar { + encryptionImage = EncryptionTrustLevelBadgeImageHelper.roomBadgeImage(for: room.summary.roomEncryptionTrustLevel()) + } else { + encryptionImage = nil + } let directUserPresence = session.user(withUserId: room.directUserId)?.presence ?? .unknown let basicInfoViewData = RoomInfoBasicViewData(avatarUrl: room.summary.avatar, diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index c00e96eb8..b85f3cd3e 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -2238,8 +2238,8 @@ static CGSize kThreadListBarButtonItemImageSize; - (UIImage*)roomEncryptionBadgeImage { UIImage *encryptionIcon; - - if (self.isEncryptionEnabled) + // bwi: #5236 remove encryption status shield + if (self.isEncryptionEnabled && BWIBuildSettings.shared.showEncryptionStatusBadgeOnAvatar) { RoomEncryptionTrustLevel roomEncryptionTrustLevel = ((RoomDataSource*)self.roomDataSource).encryptionTrustLevel; diff --git a/Riot/Utils/EventFormatter.m b/Riot/Utils/EventFormatter.m index 53a7da9d4..4b726c9e1 100644 --- a/Riot/Utils/EventFormatter.m +++ b/Riot/Utils/EventFormatter.m @@ -339,12 +339,15 @@ static NSString *const kEventFormatterTimeFormat = @"HH:mm"; if (event.sentState == MXEventSentStateSent && [event.decryptionError.domain isEqualToString:MXDecryptingErrorDomain]) { - // Track e2e failures - dispatch_async(dispatch_get_main_queue(), ^{ - [BWIAnalyticsHelper getRoomDeviceCountWithRoom:[self->mxSession roomWithRoomId:roomState.roomId] completion:^(NSInteger deviceCount) { - [[DecryptionFailureTracker sharedInstance] reportUnableToDecryptErrorForEvent:event withRoomState:roomState myUser:self->mxSession.myUser.userId roomDeviceCount:deviceCount]; - }]; - }); + // bwi: only track errors when there is a session running, otherwise all events are tracked + if (mxSession.state == MXSessionStateRunning) { + // Track e2e failures + dispatch_async(dispatch_get_main_queue(), ^{ + [BWIAnalyticsHelper getRoomDeviceCountWithRoom:[self->mxSession roomWithRoomId:roomState.roomId] completion:^(NSInteger deviceCount) { + [[DecryptionFailureTracker sharedInstance] reportUnableToDecryptErrorForEvent:event withRoomState:roomState myUser:self->mxSession.myUser.userId roomDeviceCount:deviceCount]; + }]; + }); + } if (event.decryptionError.code == MXDecryptingErrorUnknownInboundSessionIdCode) {