Skip to content

Commit 53b105d

Browse files
committed
🐛 修复 QQMessageExporter 中对 qq.reply_seq 的处理逻辑
1 parent 7d172d2 commit 53b105d

File tree

1 file changed

+3
-2
lines changed
  • src/nonebot_plugin_alconna/uniseg/adapters/qq

1 file changed

+3
-2
lines changed

src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ async def send_to(self, target: Union[Target, Event], bot: Bot, message: Message
356356
message = message.exclude("mention_channel", "mention_user", "mention_everyone", "reference")
357357
return await bot.send(event=target, message=message, **kwargs)
358358

359+
if target.extra.get("qq.reply_seq"):
360+
target.extra["qq.reply_seq"] += 1
361+
359362
if target.channel:
360363
if target.private:
361364
if not target.parent_id:
@@ -385,8 +388,6 @@ async def send_to(self, target: Union[Target, Event], bot: Bot, message: Message
385388
msg_seq=target.extra.get("qq.reply_seq"),
386389
**kwargs,
387390
)
388-
if target.extra.get("qq.reply_seq"):
389-
target.extra["qq.reply_seq"] += 1
390391
return res
391392

392393
async def recall(self, mid: Any, bot: Bot, context: Union[Target, Event]):

0 commit comments

Comments
 (0)