diff --git a/bot.go b/bot.go index 3e1e483..e640a8d 100644 --- a/bot.go +++ b/bot.go @@ -418,13 +418,13 @@ func handleNewMessage(ctx context.Context, api *tg.Client, alertPeer *tg.InputPe chatName := channel.Title // Build alert message with HTML formatting for markdown v2 - matchMessageHTML := fmt.Sprintf("🚨 Matched\nScore: %.2f\nChat: %s (ID: %d)\nUser: %s (%s) (ID: %d)\n", - result.score, escapeHTML(chatName), chatID, escapeHTML(displayName+" ("+username+")"), username, senderID) + matchMessageHTML := fmt.Sprintf("🚨 Matched\nScore: %.2f\nChat: %s (ID: %d)\nUser: %s (ID: %d)\n", + result.score, escapeMarkdown(chatName), chatID, escapeMarkdown(displayName+" ("+username+")"), senderID) // Send ntfy notification if config set (use plain text for ntfy) if cfg.NtfyToken != "" || cfg.NtfyTopic != "" { - plainMessage := fmt.Sprintf("🚨 Matched\nScore: %.2f\nChat: %s (ID: %d)\nUser: %s (%s) (ID: %d)\n", - result.score, chatName, chatID, displayName+" ("+username+")", username, senderID) + plainMessage := fmt.Sprintf("🚨 Matched\nScore: %.2f\nChat: %s (ID: %d)\nUser: %s (ID: %d)\n\n%s", + result.score, escapeMarkdown(chatName), chatID, escapeMarkdown(displayName+" ("+username+")"), senderID, escapeMarkdown(msg.Message)) notify(plainMessage, cfg.NtfyHost, cfg.NtfyTopic, fmt.Sprintf("Scam Alert: %s", chatName), 5, cfg.NtfyToken) }