wx4py icon indicating copy to clipboard operation
wx4py copied to clipboard

[Bug]: 监听群聊异步回调功能存在赋值问题

Open iijang opened this issue 6 months ago • 0 comments

微信版本号

4.1.8.29

wx4py 版本号

0.2.1

Python 版本号

3.13

Windows 版本

Windows 11

详细复现步骤

监听群聊异步回调功能存在赋值问题

class WeChatGroupProcessor:
......
 def start(self, block: bool = False) -> "WeChatGroupProcessor":
        self._stop_event.clear()
        self._start_sender()
        for handler in self.handlers:
            handler.set_action_emitter(self._action_queue.put)
        self._listener = WeChatGroupListener(
            self.client,
            self.groups,
            self._dispatch_message,
            auto_reply=False, # 不管传这里最终传入False,无法触发消息回调
            ignore_client_sent=self.ignore_client_sent,
            reply_on_at=self._needs_group_nickname(),
            group_nicknames=self.group_nicknames,
            tick=self.tick,
            batch_size=self.batch_size,
            tail_size=self.tail_size,
        )
        self._listener.start(block=False)

导致无法触发消息回调

        if self.auto_reply and reply and self._should_send_reply(event):
            self.enqueue_reply(session.group, str(reply))

预期行为

bug

实际行为

bug

日志或报错信息


截图或录屏

No response

其他补充信息

No response

iijang avatar May 30 '26 03:05 iijang