feat(ui,api,telegram): shared conversation panel for obsidian and /admin/panel, bind materializes a window, inbox survives link previews

This commit is contained in:
hh
2026-08-29 18:30:33 +02:00
parent be114e6eaf
commit 60dc7db925
58 changed files with 2858 additions and 499 deletions
+21
View File
@@ -593,3 +593,24 @@ def test_render_helpers() -> None:
assert status_label("Read", {"file_path": "/x"}) == "читаю vault"
assert status_label("mcp__firefly__list_accounts", None) == "firefly: list_accounts"
assert status_label("Foo", {"command": "ls -la"}) == "Foo ls -la"
async def test_message_with_a_link_preview_is_stored_and_answered(stack: Stack) -> None:
stack.bot.push(
{
"message": {
"message_id": 77,
"date": 1700000000,
"chat": {"id": USER, "type": "private"},
"from": {"id": USER, "is_bot": False, "first_name": "h"},
"text": "see https://x.y",
"link_preview_options": {"url": "https://x.y"},
}
}
)
await stack.until(lambda: stack.sent_with("see https://x.y"), what="reply")
async with stack.world.db.session() as session:
rows = list((await session.exec(select(TelegramUpdate))).all())
preview = rows[0].payload["message"]["link_preview_options"]
assert preview["url"] == "https://x.y"
assert preview.get("is_disabled") is None