diff --git a/.gitmodules b/.gitmodules index 90f7f83cb..84b70fa81 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "matrix-ios-sdk"] - path = matrix-ios-sdk - url = git@github.com:matrix-org/matrix-ios-sdk.git +# [submodule "matrix-ios-sdk"] +# path = matrix-ios-sdk +# url = git@github.com:matrix-org/matrix-ios-sdk.git diff --git a/Config/BWIBuildSettings.swift b/Config/BWIBuildSettings.swift index ca0912f85..1643c33e2 100644 --- a/Config/BWIBuildSettings.swift +++ b/Config/BWIBuildSettings.swift @@ -764,4 +764,10 @@ class BWIBuildSettings: NSObject { // MARK: Change Password var showPasswordRequirements = false + + // MARK: Report Room + var showReportRoomButton = false + + // MARK: Enable NSFW filter + var enableNSFWFilter = false } diff --git a/Riot/Modules/PublicRoomList/DataSources/PublicRoomsDirectoryDataSource.m b/Riot/Modules/PublicRoomList/DataSources/PublicRoomsDirectoryDataSource.m index 5ae737549..fc76ab778 100644 --- a/Riot/Modules/PublicRoomList/DataSources/PublicRoomsDirectoryDataSource.m +++ b/Riot/Modules/PublicRoomList/DataSources/PublicRoomsDirectoryDataSource.m @@ -339,15 +339,16 @@ static NSString *const kNSFWKeyword = @"nsfw"; for (MXPublicRoom *publicRoom in publicRooms) { BOOL shouldAllow = YES; - - if (publicRoom.name != nil) { - shouldAllow &= [self.forbiddenTermsRegex numberOfMatchesInString:publicRoom.name options:0 range:NSMakeRange(0, publicRoom.name.length)] == 0; + // BWI: #6076 enable nsfw filtering + if (BWIBuildSettings.shared.enableNSFWFilter) { + if (publicRoom.name != nil) { + shouldAllow &= [self.forbiddenTermsRegex numberOfMatchesInString:publicRoom.name options:0 range:NSMakeRange(0, publicRoom.name.length)] == 0; + } + + if (publicRoom.topic != nil) { + shouldAllow &= [self.forbiddenTermsRegex numberOfMatchesInString:publicRoom.topic options:0 range:NSMakeRange(0, publicRoom.topic.length)] == 0; + } } - - if (publicRoom.topic != nil) { - shouldAllow &= [self.forbiddenTermsRegex numberOfMatchesInString:publicRoom.topic options:0 range:NSMakeRange(0, publicRoom.topic.length)] == 0; - } - if (shouldAllow) { [filteredRooms addObject:publicRoom]; } diff --git a/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift b/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift index e9ec534aa..9442e8a53 100644 --- a/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift +++ b/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift @@ -280,7 +280,11 @@ final class RoomInfoListViewController: UIViewController { tmpSections.append(sectionSettings) tmpSections.append(sectionLeave) - tmpSections.append(sectionReport) + + // BWI: #6076 we do not support the report function yet + if BWIBuildSettings.shared.showReportRoomButton { + tmpSections.append(sectionReport) + } sections = tmpSections } diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 97e2bc1bd..304fc66e8 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -215,7 +215,6 @@ typedef NS_ENUM(NSUInteger, ABOUT) ABOUT_IMPRINT_INDEX, ABOUT_THIRD_PARTY_INDEX, ABOUT_SUPPORT_INDEX, - ABOUT_SHOW_NSFW_ROOMS_INDEX, ABOUT_CRASH_REPORT_INDEX, ABOUT_ENABLE_RAGESHAKE_INDEX, ABOUT_MARK_ALL_AS_READ_INDEX,