This repository has been archived by the owner on Aug 12, 2024. It is now read-only.
[WIP] fix: should encode defaults in websocket json #234
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.
请勿合并!目前发现此 PR 会导致发送图片后 bot 断开与 nonebot2 的连接,原因待查
此设置中的
encodeDefaults = false
使得 0、空字符串不会被编码到 json 字符串中,导致配合 adapter-onebot 使用时出现一些错误例如:
在获取不到 uin 时将 user_id 字段值定义为 0,导致编码为 json 时 user_id 缺失:bug: 部分事件不符合Onebot V11标准 #150 (comment)
申请加群时,如验证消息为空,则
comment
字段不会被编码到 json 中,不符合 onebot 标准,配合 adapter-onebot 使用时出错由于我对 OpenShamrock 了解不深,暂时不知更改此设置是否会导致某些副作用