Fix wecomcs open_kfid msgid - #2449
Open
DeepCodeYang wants to merge 2 commits into
Open
Conversation
fix bug wecomcs send_message open_kfid event.receiver_id is open_kfid
fix bug msgid exceeds the 32-byte limit
Contributor
|
All contributors have signed the CLA. ✅ 所有贡献者均已签署 CLA。 |
Author
|
I have read the CLA Document and I hereby sign the CLA |
dadachann
added a commit
to langbot-app/cla
that referenced
this pull request
Aug 18, 2026
Member
|
Hi @DeepCodeYang , please fix the unit test issues. |
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.
概述 / Overview
send_message 调用时无法获取open_kid,在 wecomcs.py 中找到 WecomEventConverter 类的 target2yiri 方法,将处理 text
和 image 事件时的 friend处代码,将id补充前缀 event.receiver_id (即 open_kfid)。
msgid 长度超限:企业微信客服 API 官方文档明确规定,主动发送消息时的 msgid(消息 ID)最大长度不能超过 32 字节,由于uuid.uuid4().hex 本身已经是 32 个字符,于是把langbot_前缀去掉。
【补充企业微信官方文档地址:】https://developer.work.weixin.qq.com/document/path/94700
并且在文字text类型下方增加了对图片类型image的支持。
更改前后对比截图 / Screenshots
检查清单 / Checklist
PR 作者完成 / For PR author
请在方括号间写
x以打勾 / Please tick the box withx项目维护者完成 / For project maintainer