mirror of
https://gitverse.ru/kpa39l/vesti.git
synced 2026-09-29 09:55:03 +00:00
fix+docs: classifier/publisher правки, sources.yaml расширен, глоссарий CONTEXT.md + docs/agents, backup.sh; openspec post-translate/rewrite-as-author/rich-repost-card/selected-layout-stay
This commit is contained in:
+7
-2
@@ -25,7 +25,9 @@ def make_card(post: dict, comment: str | None = None) -> dict:
|
||||
это был «агрегаторный» вид карточки.
|
||||
"""
|
||||
comment = (comment or "").strip()
|
||||
body = (post.get("text") or "").strip()
|
||||
# тело: пересказ (rewritten_text) приоритетнее исходного текста
|
||||
body = (post.get("rewritten_text") or post.get("text") or "").strip()
|
||||
rewritten = bool((post.get("rewritten_text") or "").strip())
|
||||
|
||||
# ссылка на оригинал / атрибуция своего контента
|
||||
is_own = int(post.get("is_own") or 0) == 1
|
||||
@@ -34,7 +36,10 @@ def make_card(post: dict, comment: str | None = None) -> dict:
|
||||
orig = f"https://t.me/dedinit/{post['tg_post_id']}"
|
||||
elif post.get("url"):
|
||||
orig = post.get("url")
|
||||
if is_own:
|
||||
if rewritten:
|
||||
# пересказ — публикация от имени автора канала (не пересылка)
|
||||
tail = "✍️ Дед в АйТи (@dedinit)" + (f" · Источник: {orig}" if orig else "")
|
||||
elif is_own:
|
||||
tail = "✍️ Дед в АйТи (@dedinit)" + (f" · {orig}" if orig else "")
|
||||
elif orig:
|
||||
tail = f"🔗 Оригинал: {orig}"
|
||||
|
||||
Reference in New Issue
Block a user