[patch] 修正pdd不识别系统消息的问题
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user