[patch] 修正pdd不识别系统消息的问题

This commit is contained in:
Gitea Actions Bot
2025-10-13 14:04:01 +08:00
parent 461d743ea6
commit f651e0e3f0

View File

@@ -2643,6 +2643,11 @@ class ChatPdd:
goods_info = message_info.get("info", {}) goods_info = message_info.get("info", {})
from_info = message_info.get("from", {}) from_info = message_info.get("from", {})
uid = from_info.get("uid") uid = from_info.get("uid")
role = from_info.get("role")
if role != "user":
self._log(f"过滤非用户消息 (role={role})", "DEBUG")
return
if nickname and content and uid: if nickname and content and uid:
self._log(f"用户消息 - {nickname}: {content}", "INFO") self._log(f"用户消息 - {nickname}: {content}", "INFO")