diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-04-21 20:16:37 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-04-21 20:16:37 +0900 |
| commit | 5a9530ccd4249cf37d50769015adbffba34014ab (patch) | |
| tree | 5509ac4e4ad9c2af15dcc49bc9b722873db45bb2 /src/misc | |
| parent | fix(lint): Use const (diff) | |
| download | misskey-5a9530ccd4249cf37d50769015adbffba34014ab.tar.gz misskey-5a9530ccd4249cf37d50769015adbffba34014ab.tar.bz2 misskey-5a9530ccd4249cf37d50769015adbffba34014ab.zip | |
Fix #6229
Diffstat (limited to 'src/misc')
| -rw-r--r-- | src/misc/check-hit-antenna.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc/check-hit-antenna.ts b/src/misc/check-hit-antenna.ts index fa24794984..62bb9867e7 100644 --- a/src/misc/check-hit-antenna.ts +++ b/src/misc/check-hit-antenna.ts @@ -43,7 +43,7 @@ export async function checkHitAntenna(antenna: Antenna, note: Note, noteUser: Us if (note.text == null) return false; const matched = antenna.keywords.some(keywords => - keywords.every(keyword => + keywords.filter(keyword => keyword !== '').every(keyword => antenna.caseSensitive ? note.text!.includes(keyword) : note.text!.toLowerCase().includes(keyword.toLowerCase()) @@ -56,7 +56,7 @@ export async function checkHitAntenna(antenna: Antenna, note: Note, noteUser: Us if (note.text == null) return false; const matched = antenna.excludeKeywords.some(keywords => - keywords.every(keyword => + keywords.filter(keyword => keyword !== '').every(keyword => antenna.caseSensitive ? note.text!.includes(keyword) : note.text!.toLowerCase().includes(keyword.toLowerCase()) |