fix(telegram): address code review issues from cherry-pick merge
- Fix critical plain-text fallback that was sending raw HTML tags to users: keep raw markdown available for the fallback path - Extract TELEGRAM_HTML_MAX_LEN (4096) constant to replace hardcoded magic number and document the difference from TELEGRAM_MAX_MESSAGE_LEN - Add fallback to _send_text for extra HTML chunks when HTML parse fails - Add missing @pytest.mark.asyncio decorator on test_send_delta_stream_end_html_expansion_does_not_overflow
This commit is contained in:
@@ -497,6 +497,7 @@ async def test_send_delta_stream_end_splits_oversized_reply() -> None:
|
||||
assert "123" not in channel._stream_bufs
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_send_delta_stream_end_html_expansion_does_not_overflow() -> None:
|
||||
"""Markdown that expands when converted to HTML is still split correctly.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user