fix(backend): rich messages of the new telegram layer read as plain text instead of no text
This commit is contained in:
1 parent
7f124059be
commit
01cf01b629
2 files changed
+64
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user