feat(onebot): 同步群信息与文件发送增强 - #2
Open
serfend wants to merge 3 commits into
Open
Conversation
原因:发布版 OneBot 适配器只有缓存群列表,缺少标准 get_group_info 动作,调用方无法按群获取实时名称、成员数和容量信息。 新增:注册 get_group_info 动作,支持 QQ 群号映射和 OpenID 直传;调用平台群资料接口并转换为 OneBot 标准响应。 修复:对无效群号、异常计数字段和平台错误做校验与错误码透传,并补充 README 动作说明。
原因:发布版 OneBot 群消息事件只有 group_id,消费端需要额外查询才能展示群名,逐条实时查询又会增加平台请求。 新增:群事件附带 group_name;优先读取已保存群记录,缺失时刷新群资料,并按应用与群维度缓存结果。 更改:成功结果缓存 5 分钟,空结果缓存 1 小时;并发刷新通过锁合并,查询失败不影响事件上报。
原因:发布版文件消息段虽然已经解析 name 或 file_name,但媒体发送服务没有向上传链路继续传递,附件会丢失调用方指定的名称和扩展名。 修复:将 ParsedMessage.file_name 传入统一媒体发送接口,使普通上传、URL 上传和分片上传沿用原始文件名;同时移除该文件中的重复类型导入。
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.
变更原因
同步 ElainaBot_v2 主仓库中的 OneBot 适配器更新,补齐实时群信息查询和群名上报能力,并修复文件发送后丢失原始文件名的问题。
具体变更
验证