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
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

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