regex filter fix
This commit is contained in:
parent
64641ab517
commit
7964573beb
@ -77,8 +77,9 @@ module.exports = class WordFilter extends FilterSetting {
|
||||
|
||||
} else if (['explicit', 'fuzzy', 'regex', 'whitelist'].includes(method)) {
|
||||
|
||||
if (method === 'regex') args = args.map((arg) => Util.sanitiseRegex(arg));
|
||||
const resolved = await resolver.resolveMethod(args, {
|
||||
const [first, ...rest] = args; // First arg should skip sanitisation
|
||||
if (method === 'regex') args = rest.map((arg) => Util.sanitiseRegex(arg));
|
||||
const resolved = await resolver.resolveMethod([first, ...args], {
|
||||
existing: setting[method],
|
||||
allowedMethods: ['add', 'remove', 'set', 'reset']
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user