Comment why weird concat here
This commit is contained in:
parent
647ebc4f98
commit
dee8ce8186
|
@ -265,6 +265,8 @@ class RoomDirectoryViewModel extends ViewModel {
|
||||||
|
|
||||||
if (safeSearchEnabled) {
|
if (safeSearchEnabled) {
|
||||||
this._roomCardViewModelsFilterMap.setApply((roomId, vm) => {
|
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) =>
|
const isNsfw = NSFW_REGEXES.some((regex) =>
|
||||||
regex.test(vm.name + ' ---- ' + vm.canonicalAlias + ' --- ' + vm.topic)
|
regex.test(vm.name + ' ---- ' + vm.canonicalAlias + ' --- ' + vm.topic)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue