summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts/should-mute-note.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/app/common/scripts/should-mute-note.ts')
-rw-r--r--src/client/app/common/scripts/should-mute-note.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/app/common/scripts/should-mute-note.ts b/src/client/app/common/scripts/should-mute-note.ts
index 8a6430b1df..42e1679158 100644
--- a/src/client/app/common/scripts/should-mute-note.ts
+++ b/src/client/app/common/scripts/should-mute-note.ts
@@ -4,7 +4,8 @@ export default function(me, settings, note) {
const includesMutedWords = (text: string) =>
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;
return (