diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-02-16 19:37:05 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-02-16 19:37:05 +0900 |
| commit | ec3ca3032ef20916d1df40be5156bc4a908fa663 (patch) | |
| tree | 12f9414a8da653e3de86f1144ac4154d204fadb2 /src/client/app/common | |
| parent | Merge branch 'develop' of https://github.com/syuilo/misskey into develop (diff) | |
| download | sharkey-ec3ca3032ef20916d1df40be5156bc4a908fa663.tar.gz sharkey-ec3ca3032ef20916d1df40be5156bc4a908fa663.tar.bz2 sharkey-ec3ca3032ef20916d1df40be5156bc4a908fa663.zip | |
ミュートワードで正規表現を使えるように
Diffstat (limited to 'src/client/app/common')
| -rw-r--r-- | src/client/app/common/scripts/should-mute-note.ts | 3 |
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 ( |