Resolve #6043
This commit is contained in:
parent
7de915d47b
commit
c7c08b7511
10 changed files with 58 additions and 2 deletions
|
@ -52,6 +52,19 @@ export async function checkHitAntenna(antenna: Antenna, note: Note, noteUser: Us
|
|||
if (!matched) return false;
|
||||
}
|
||||
|
||||
if (antenna.excludeKeywords.length > 0) {
|
||||
if (note.text == null) return false;
|
||||
|
||||
const matched = antenna.excludeKeywords.some(keywords =>
|
||||
keywords.every(keyword =>
|
||||
antenna.caseSensitive
|
||||
? note.text!.includes(keyword)
|
||||
: note.text!.toLowerCase().includes(keyword.toLowerCase())
|
||||
));
|
||||
|
||||
if (matched) return false;
|
||||
}
|
||||
|
||||
if (antenna.withFile) {
|
||||
if (note.fileIds.length === 0) return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue