mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 00:55:48 +01:00
ミュートワードで正規表現を使えるように
This commit is contained in:
parent
890770c275
commit
ec3ca3032e
1 changed files with 2 additions and 1 deletions
|
@ -4,7 +4,8 @@ export default function(me, settings, note) {
|
||||||
|
|
||||||
const includesMutedWords = (text: string) =>
|
const includesMutedWords = (text: string) =>
|
||||||
text
|
text
|
||||||
? settings.mutedWords.some(q => q.length > 0 && !q.some(word => !text.includes(word)))
|
? settings.mutedWords.some(q => q.length > 0 && !q.some(word =>
|
||||||
|
word.startsWith('/') && word.endsWith('/') ? !(new RegExp(word.substr(1, word.length - 2)).test(text)) : !text.includes(word)))
|
||||||
: false;
|
: false;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue