Make antennas also match on CW text, resolves #117

This commit is contained in:
Laura Hausmann 2023-08-19 15:05:00 +02:00
parent 40a0f31089
commit afeadd5bfb
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -101,8 +101,8 @@ export async function checkHitAntenna(
const matched = keywords.some((and) => const matched = keywords.some((and) =>
and.every((keyword) => and.every((keyword) =>
antenna.caseSensitive antenna.caseSensitive
? note.text!.includes(keyword) ? note.text!.includes(keyword) || note.cw?.includes(keyword)
: note.text!.toLowerCase().includes(keyword.toLowerCase()), : note.text!.toLowerCase().includes(keyword.toLowerCase()) || note.cw?.toLowerCase().includes(keyword.toLowerCase()),
), ),
); );
@ -120,8 +120,8 @@ export async function checkHitAntenna(
const matched = excludeKeywords.some((and) => const matched = excludeKeywords.some((and) =>
and.every((keyword) => and.every((keyword) =>
antenna.caseSensitive antenna.caseSensitive
? note.text!.includes(keyword) ? note.text!.includes(keyword) || note.cw?.includes(keyword)
: note.text!.toLowerCase().includes(keyword.toLowerCase()), : note.text!.toLowerCase().includes(keyword.toLowerCase()) || note.cw?.toLowerCase().includes(keyword.toLowerCase()),
), ),
); );