mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
feat: foss merge changes from review
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user