fix: use find_user_by_chat_id for expand_promo_detail AI config
This commit is contained in:
@@ -535,8 +535,9 @@ def _handle_callback(bot_token: str, cfg: Config, cb: dict):
|
|||||||
"text": "🤖 *AI思考中…*", "parse_mode": "MarkdownV2",
|
"text": "🤖 *AI思考中…*", "parse_mode": "MarkdownV2",
|
||||||
})
|
})
|
||||||
try:
|
try:
|
||||||
|
user = find_user_by_chat_id(cfg, chat_id)
|
||||||
details = expand_promo_detail(
|
details = expand_promo_detail(
|
||||||
cfg.ai, ctx["sender"], ctx["subject"], ctx["original_body"],
|
user.ai, ctx["sender"], ctx["subject"], ctx["original_body"],
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
send_text(bot_token, str(chat_id), f"获取详情失败: {e}")
|
send_text(bot_token, str(chat_id), f"获取详情失败: {e}")
|
||||||
|
|||||||
Reference in New Issue
Block a user