Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/channels/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ def build_payload(
self, config: dict[str, Any], user_id: int, message: str
) -> dict[str, Any]:
chat_id = int(config.get("chat_id", user_id))
return {"chat_id": chat_id, "text": message[:4096]}
return {
"chat_id": chat_id,
"text": message[:4096],
"parse_mode": "HTML",
}

async def send(
self,
Expand Down
1 change: 1 addition & 0 deletions tests/test_channel_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ async def test_telegram_adapter_payload_and_success(
req = transport.requests[0]
assert req.url.path.endswith("/botTOK/sendMessage")
assert b'"chat_id":42' in req.content
assert b'"parse_mode":"HTML"' in req.content
assert b"hello" in req.content


Expand Down
Loading