Comment why weird concat here

This commit is contained in:
Eric Eastwood 2023-05-02 18:18:12 -05:00
parent 647ebc4f98
commit dee8ce8186
1 changed files with 2 additions and 0 deletions

View File

@ -265,6 +265,8 @@ class RoomDirectoryViewModel extends ViewModel {
if (safeSearchEnabled) {
this._roomCardViewModelsFilterMap.setApply((roomId, vm) => {
// We concat the name, topic, etc together to simply do a single check against
// all of the text.
const isNsfw = NSFW_REGEXES.some((regex) =>
regex.test(vm.name + ' ---- ' + vm.canonicalAlias + ' --- ' + vm.topic)
);