mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-16 06:28:27 +02:00
feat: foss merge changes from review
This commit is contained in:
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
|||||||
[submodule "matrix-ios-sdk"]
|
# [submodule "matrix-ios-sdk"]
|
||||||
path = matrix-ios-sdk
|
# path = matrix-ios-sdk
|
||||||
url = git@github.com:matrix-org/matrix-ios-sdk.git
|
# url = git@github.com:matrix-org/matrix-ios-sdk.git
|
||||||
|
|||||||
@@ -764,4 +764,10 @@ class BWIBuildSettings: NSObject {
|
|||||||
|
|
||||||
// MARK: Change Password
|
// MARK: Change Password
|
||||||
var showPasswordRequirements = false
|
var showPasswordRequirements = false
|
||||||
|
|
||||||
|
// MARK: Report Room
|
||||||
|
var showReportRoomButton = false
|
||||||
|
|
||||||
|
// MARK: Enable NSFW filter
|
||||||
|
var enableNSFWFilter = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -339,15 +339,16 @@ static NSString *const kNSFWKeyword = @"nsfw";
|
|||||||
for (MXPublicRoom *publicRoom in publicRooms)
|
for (MXPublicRoom *publicRoom in publicRooms)
|
||||||
{
|
{
|
||||||
BOOL shouldAllow = YES;
|
BOOL shouldAllow = YES;
|
||||||
|
// BWI: #6076 enable nsfw filtering
|
||||||
if (publicRoom.name != nil) {
|
if (BWIBuildSettings.shared.enableNSFWFilter) {
|
||||||
shouldAllow &= [self.forbiddenTermsRegex numberOfMatchesInString:publicRoom.name options:0 range:NSMakeRange(0, publicRoom.name.length)] == 0;
|
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) {
|
if (shouldAllow) {
|
||||||
[filteredRooms addObject:publicRoom];
|
[filteredRooms addObject:publicRoom];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,7 +280,11 @@ final class RoomInfoListViewController: UIViewController {
|
|||||||
|
|
||||||
tmpSections.append(sectionSettings)
|
tmpSections.append(sectionSettings)
|
||||||
tmpSections.append(sectionLeave)
|
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
|
sections = tmpSections
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,7 +215,6 @@ typedef NS_ENUM(NSUInteger, ABOUT)
|
|||||||
ABOUT_IMPRINT_INDEX,
|
ABOUT_IMPRINT_INDEX,
|
||||||
ABOUT_THIRD_PARTY_INDEX,
|
ABOUT_THIRD_PARTY_INDEX,
|
||||||
ABOUT_SUPPORT_INDEX,
|
ABOUT_SUPPORT_INDEX,
|
||||||
ABOUT_SHOW_NSFW_ROOMS_INDEX,
|
|
||||||
ABOUT_CRASH_REPORT_INDEX,
|
ABOUT_CRASH_REPORT_INDEX,
|
||||||
ABOUT_ENABLE_RAGESHAKE_INDEX,
|
ABOUT_ENABLE_RAGESHAKE_INDEX,
|
||||||
ABOUT_MARK_ALL_AS_READ_INDEX,
|
ABOUT_MARK_ALL_AS_READ_INDEX,
|
||||||
|
|||||||
Reference in New Issue
Block a user