Feat: qq-botpy 适配器对 member 和 group 的 openid 进行静态缓存 #726
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.
概述
使用 QQ 官方 API 作为 Q 群(需要测试资格)机器人时,群 id 和 成员 id 均为 字符串,而内部处理逻辑只支持 int,以前会在运行时维护一个映射表,按照顺位分配 int,重启后即丢失,无法进行访问权限等设置。
现在使用一个摘要算法,取字符串id最后10位,计算其int值,存入
data/metadata/adapter-qq-botpy.json
中,用户可自行修改,重启后仍有效。