fix: handle message sending in QQOfficialMessageEvent class (#3894)

- Added a fallback to the `_post_send` method without parameters when the stream payload is not set, ensuring proper message handling in all scenarios.

fixes: #3893
This commit is contained in:
Soulter
2025-12-03 13:15:12 +08:00
committed by GitHub
parent 8006981976
commit 4d819546b0
@@ -69,6 +69,8 @@ class QQOfficialMessageEvent(AstrMessageEvent):
# 结束流式对话,并且传输 buffer 中剩余的消息
stream_payload["state"] = 10
ret = await self._post_send(stream=stream_payload)
else:
ret = await self._post_send()
except Exception as e:
logger.error(f"发送流式消息时出错: {e}", exc_info=True)