fix: address bot identity review regressions

This commit is contained in:
晴猫
2026-03-15 07:51:31 +09:00
parent c8dc9ddb60
commit 4f8ab0abb1
8 changed files with 77 additions and 17 deletions

View File

@@ -42,8 +42,12 @@ class DirectMessageSender:
segments = Seg(type="seglist", data=[Seg(type="text", data=content)])
# 获取麦麦的信息
bot_user_id = get_bot_account(chat_stream.platform)
if not bot_user_id:
logger.warning(f"[私聊][{self.private_name}]平台 {chat_stream.platform} 未配置机器人账号,发送消息时回退到 QQ 账号")
bot_user_id = str(getattr(global_config.bot, "qq_account", "")).strip()
bot_user_info = UserInfo(
user_id=get_bot_account(chat_stream.platform),
user_id=bot_user_id,
user_nickname=global_config.bot.nickname,
)