Repository navigation
Telegram: bold target name and status (HTML mode) - #21
Merged
Merged
Conversation
Telegram messages are sent with parse_mode HTML. Alert texts carry invisible bold markers that are turned into <b> tags (with everything else escaped) at send time, and removed for email and the dashboard queue view. Queue rows stored before this change are sent escaped and not bold. Truncation happens before the HTML is built. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The notifications.csv dump wrote stored messages with the invisible private-use bold markers. Seed test notifications with markers so every reader is checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Owner feedback #9: in Telegram the target name and status are now bold.
parse_mode: "HTML".notify::markup). At Telegram send time everything is HTML-escaped (&,<,>) and the markers become<b>...</b>. For email and the dashboard queue list the markers are removed, so email stays plain text.html()always produces balanced tags, even for hostile input.Examples (rendered, then raw HTML sent)
🐧 <b>web-1: host RECOVERED</b> after 12m (down since 14:02 UTC)🐧 <b>db-1: ssh OFFLINE</b> (refused) since 14:02 UTC🐧 <b>Telegram restored after 2m</b> (unreachable since 2026-11-30 13:58 UTC)Test plan
a<b&cescaped; request hasparse_mode=HTML.<b>and no cut entity.cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test(479 pass) in WSL.🤖 Generated with Claude Code