diff --git a/src/tg_bot.py b/src/tg_bot.py index fcd9eaf..ddd0bc3 100644 --- a/src/tg_bot.py +++ b/src/tg_bot.py @@ -326,10 +326,12 @@ def _handle_callback(tg_cfg: TelegramConfig, cfg: Config, cb: dict): elif action == CALLBACK_VIEW_SUMM and ctx: can_reply = ctx.get("can_reply", True) + is_promotion = ctx.get("summary_data", {}).get("category") == "promotion" + links = ctx.get("summary_data", {}).get("links", []) _tg_req(tg_cfg, "editMessageText", { "chat_id": chat_id, "message_id": msg_id, "text": ctx["summary_text"], "parse_mode": "MarkdownV2", - "reply_markup": _summary_keyboard(can_reply), + "reply_markup": _summary_keyboard(can_reply, is_promotion, links), }) logger.info(" 切换回摘要视图")