fix(backend): rich messages of the new telegram layer read as plain text instead of no text

This commit is contained in:
hh committed 2026-10-14 05:06:35 +02:00
1 parent 7f124059be
commit 01cf01b629
2 files changed
+64

No files matched your search

+3
View File
@@ -22,6 +22,7 @@ from utils.read.models import (
StickerView,
WebPageView,
)
from utils.read.rich_text import rich_text
_MEDIA_KEYS = (
"photo",
@@ -382,6 +383,8 @@ def build_message_view(
row: asyncpg.Record, raw: dict[str, Any], media: list[MediaRef]
) -> MessageView:
base = _base_fields(row)
if base["text"] is None:
base["text"] = rich_text(raw.get("rich_message"))
via_bot = raw.get("via_bot")
sticker = _sticker(raw)
try: