Filter NSFW content in room directory (#10196)

* add SpotlightSearch.showNsfwPublicRooms setting

* use setting in publicroomsearch

* add nsfw keyword filter and setting for room directory

* unit tests

* remove assertions
This commit is contained in:
Kerry 2023-02-22 23:23:52 +13:00 committed by GitHub
parent 03e4b96037
commit 168f6df7c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 86 additions and 2 deletions

View file

@ -743,6 +743,11 @@ export const SETTINGS: { [setting: string]: ISetting } = {
supportedLevels: [SettingLevel.ACCOUNT],
default: [], // list of room IDs, most recent first
},
"SpotlightSearch.showNsfwPublicRooms": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("Show NSFW content"),
default: false,
},
"room_directory_servers": {
supportedLevels: [SettingLevel.ACCOUNT],
default: [],