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

This commit is contained in:
tt-P607
2025-09-10 23:06:41 +08:00
committed by Windpicker-owo
parent ff35586f84
commit 63b42d2814

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: