fix(notify): switch Telegram parse_mode from Markdown to HTML

Underscores in alert text (dark_green, FIRE_BUY) broke Telegram's
legacy Markdown parser, causing ok:false → retries exhausted → failed.
HTML parse_mode is more robust and doesn't treat _ as italic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-04-16 23:01:28 +00:00
parent 840c23f74c
commit 51e98ae3d3
2 changed files with 5 additions and 4 deletions

View File

@@ -228,7 +228,7 @@ def test_telegram_send_ok() -> None:
n = TelegramNotifier("token", "chat123", session=session)
n.send(_alert("Hi"))
assert len(session.calls) == 1
assert "*Hi*" in session.calls[0]["json"]["text"]
assert "<b>Hi</b>" in session.calls[0]["json"]["text"]
def test_telegram_429_raises() -> None: