mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
* fix: QQ官方私聊主动推送不再因缺少缓存 msg_id 而跳过发送 (#7904) - 私聊场景下 _send_by_session_common 在无缓存 msg_id 时提前 return, 导致重启后 cron 等主动推送的消息无法发送。 - 私聊主动推送不需要 msg_id,跳过此检查。 * test: 补充 QQ 官方群聊有缓存 msg_id 时正常发送的测试 (#7904) * Delete tests/unit/test_qqofficial_adapter.py --------- Co-authored-by: Weilong Liao <37870767+Soulter@users.noreply.github.com>
This commit is contained in:
@@ -222,8 +222,9 @@ class QQOfficialPlatformAdapter(Platform):
|
||||
):
|
||||
return
|
||||
|
||||
# 私聊主动推送不需要 msg_id,见 https://github.com/AstrBotDevs/AstrBot/issues/7904
|
||||
msg_id = self._session_last_message_id.get(session.session_id)
|
||||
if not msg_id:
|
||||
if not msg_id and session.message_type != MessageType.FRIEND_MESSAGE:
|
||||
logger.warning(
|
||||
"[QQOfficial] No cached msg_id for session: %s, skip send_by_session",
|
||||
session.session_id,
|
||||
|
||||
Reference in New Issue
Block a user