fix(wecomapp): 修复WebSocket连接和事件处理器问题#164
Merged
lsdefine merged 1 commit intolsdefine:mainfrom Apr 25, 2026
Merged
Conversation
修复企业微信机器人无法正常连接的问题: 1. 修复WSClient初始化参数传递错误 - 原代码错误地将参数传递给WSClient构造函数 - 修正为正确传递host, port, path等参数 2. 修复连接方法调用错误 - 将connect_async()改为connect()方法 - AiBotSDK的WSClient使用同步connect方法 3. 修复事件处理器签名不匹配 - on_connected/on_authenticated: 移除frame参数(这些处理器不需要参数) - on_disconnected: 添加reason参数 - on_error: 添加error参数 修复后验证: - WebSocket连接成功建立 - 认证过程正常完成 - 心跳机制正常工作 - 日志无错误信息 此修复解决了企业微信机器人启动后无法连接服务器的问题。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复内容
问题描述
企业微信机器人无法正常连接到服务器,WebSocket连接失败。
修复方案
修改文件
frontends/wecomapp.py测试结果
修复后企业微信机器人可以正常:
影响范围
frontends/wecomapp.py文件