Add check for extended_latin and links

This commit is contained in:
Astra 2026-02-26 21:36:59 +00:00
parent af46dbe003
commit 4f6f70afad

6
bot.go
View file

@ -313,6 +313,11 @@ func handleNewMessage(ctx context.Context, api *tg.Client, alertPeer *tg.InputPe
return nil
}
if result.score == 1.0 ||
(result.score == 1.0 &&
result.matchedKeywords["extended_latin"] != nil &&
len(result.matchedKeywords["links"]) > 0) {
log.Printf("Matched message with score %.2f", result.score)
for key, values := range result.matchedKeywords {
for _, value := range values {
@ -403,6 +408,7 @@ func handleNewMessage(ctx context.Context, api *tg.Client, alertPeer *tg.InputPe
if err != nil {
log.Printf("Failed to send alert message: %v", err)
}
}
return nil
}