-
Notifications
You must be signed in to change notification settings - Fork 42
[FIX] 添加JSON序列化反序列化接口,修复若干问题 #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
在开发的时候发现go的interface{}方式对于JSON反射的序列化和反序列化添加了不便使得不能直接的使用JSON进行序列化和反序列化,所以考虑添加一个接口代替原本默认的反射以使得类型能够被识别,但是代价是略微增加JSON体积 |
现在修复了FetchForwardMsg函数的问题:传递的Uin不对 |
另外还有一个问题:FetchFriend函数已经保持了和Lagrange.Core完全相同的逻辑为什么还是获得消息失败? |
并且我发现PreprocessPrivateMessageEvent函数不及时返回也和这个有关系,如果这个确实无法正常的请求能否考虑使用别的方法来修复这个底层协议? |
还有两个协议我修改为和Lagrange.Core相同的形式仍然无法正常请求:BuildGroupRecordDownloadReq、BuildGroupVideoDownloadReq |
在开发时发现ToReadableStringEle函数没有对于所有类型进行枚举,这里修改了部分顺序,添加了两个没有枚举的类型,以保持和这个一样的枚举方向:
const (
Text ElementType = iota // 文本
Image // 图片
Face // 表情
At // 艾特
Reply // 回复
Service // 服务
Forward // 转发
File // 文件
Voice // 语音
Video // 视频
LightApp // 轻应用
RedBag // 红包
MarketFace // 魔法表情
)