From ff7fd2f5e092f69e47987d7ef65975f954a47069 Mon Sep 17 00:00:00 2001 From: fdc310 <2213070223@qq.com> Date: Tue, 23 Jun 2026 16:04:29 +0800 Subject: [PATCH] feat(qqofficial): synchronize passive-reply counter with inbound message sequence --- src/langbot/pkg/platform/sources/qqofficial.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/langbot/pkg/platform/sources/qqofficial.py b/src/langbot/pkg/platform/sources/qqofficial.py index 1c2f6fe86..392b174e0 100644 --- a/src/langbot/pkg/platform/sources/qqofficial.py +++ b/src/langbot/pkg/platform/sources/qqofficial.py @@ -485,6 +485,12 @@ class QQOfficialAdapter(abstract_platform_adapter.AbstractMessagePlatformAdapter if source.t != 'C2C_MESSAGE_CREATE': return False + # The stream endpoint still consumes msg_seq for this inbound msg_id. + # Keep the passive-reply counter in sync so a follow-up form card uses + # msg_seq=2 instead of being deduplicated by QQ as another seq=1 send. + if source.d_id: + self._anchor_msg_seq[source.d_id] = max(self._anchor_msg_seq.get(source.d_id, 0), 1) + ctx = { 'user_openid': source.user_openid, 'msg_id': source.d_id,