[FIX] 添加JSON序列化反序列化接口,修复若干问题#160
Merged
Redmomn merged 10 commits intoLagrangeDev:masterfrom Oct 25, 2025
Merged
Conversation
Contributor
Author
|
在开发的时候发现go的interface{}方式对于JSON反射的序列化和反序列化添加了不便使得不能直接的使用JSON进行序列化和反序列化,所以考虑添加一个接口代替原本默认的反射以使得类型能够被识别,但是代价是略微增加JSON体积 |
Contributor
Author
|
现在修复了FetchForwardMsg函数的问题:传递的Uin不对 |
Contributor
Author
|
另外还有一个问题:FetchFriend函数已经保持了和Lagrange.Core完全相同的逻辑为什么还是获得消息失败? |
Contributor
Author
|
并且我发现PreprocessPrivateMessageEvent函数不及时返回也和这个有关系,如果这个确实无法正常的请求能否考虑使用别的方法来修复这个底层协议? |
Contributor
Author
|
还有两个协议我修改为和Lagrange.Core相同的形式仍然无法正常请求:BuildGroupRecordDownloadReq、BuildGroupVideoDownloadReq |
Redmomn
approved these changes
Oct 25, 2025
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.
在开发时发现ToReadableStringEle函数没有对于所有类型进行枚举,这里修改了部分顺序,添加了两个没有枚举的类型,以保持和这个一样的枚举方向:
const (
Text ElementType = iota // 文本
Image // 图片
Face // 表情
At // 艾特
Reply // 回复
Service // 服务
Forward // 转发
File // 文件
Voice // 语音
Video // 视频
LightApp // 轻应用
RedBag // 红包
MarketFace // 魔法表情
)