Fix #6229
This commit is contained in:
parent
0a4d119d86
commit
5a9530ccd4
|
@ -43,7 +43,7 @@ export async function checkHitAntenna(antenna: Antenna, note: Note, noteUser: Us
|
||||||
if (note.text == null) return false;
|
if (note.text == null) return false;
|
||||||
|
|
||||||
const matched = antenna.keywords.some(keywords =>
|
const matched = antenna.keywords.some(keywords =>
|
||||||
keywords.every(keyword =>
|
keywords.filter(keyword => keyword !== '').every(keyword =>
|
||||||
antenna.caseSensitive
|
antenna.caseSensitive
|
||||||
? note.text!.includes(keyword)
|
? note.text!.includes(keyword)
|
||||||
: note.text!.toLowerCase().includes(keyword.toLowerCase())
|
: 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;
|
if (note.text == null) return false;
|
||||||
|
|
||||||
const matched = antenna.excludeKeywords.some(keywords =>
|
const matched = antenna.excludeKeywords.some(keywords =>
|
||||||
keywords.every(keyword =>
|
keywords.filter(keyword => keyword !== '').every(keyword =>
|
||||||
antenna.caseSensitive
|
antenna.caseSensitive
|
||||||
? note.text!.includes(keyword)
|
? note.text!.includes(keyword)
|
||||||
: note.text!.toLowerCase().includes(keyword.toLowerCase())
|
: note.text!.toLowerCase().includes(keyword.toLowerCase())
|
||||||
|
|
Loading…
Reference in New Issue