fix(chat): 避免在message_data为空时产生`AttributeError

This commit is contained in:
tt-P607
2025-09-10 23:06:41 +08:00
parent 2e6c628cb9
commit cf5b7e9083

View File

@@ -139,7 +139,7 @@ class ResponseHandler:
need_reply = new_message_count >= random.randint(2, 4)
reply_text = ""
is_proactive_thinking = message_data.get("message_type") == "proactive_thinking"
is_proactive_thinking = (message_data.get("message_type") == "proactive_thinking") if message_data else True
first_replied = False
for reply_seg in reply_set: