cyanray / mirai-cpp

本项目为 mirai-api-http 的 C++ 封装,方便使用 C++ 开发基于 mirai-api-http 插件。
GNU Affero General Public License v3.0
148 stars 38 forks source link

有关VoiceMessage的问题 #146

Closed Numendacil closed 1 year ago

Numendacil commented 2 years ago

虽然 commit https://github.com/cyanray/mirai-cpp/commit/c8f668dc0f736f0470c2a425217eeaaafcb20f18 修复了相关的代码,但是貌似这个commit https://github.com/cyanray/mirai-cpp/commit/625b96a20b7591314d0e8ec625cef159e9bdf2a2 又把有问题的部分加回来了

在VoiceMessage.hpp的ToJson()函数中 json result = { { "type", type_ }, { "voiceId", voiceId_.empty() ? nullptr : voiceId_ }, { "url", url_.empty() ? nullptr : url_ }, { "path", path_.empty() ? nullptr : path_ }, { "base64", base64_.empty() ? nullptr : base64_ }, { "length", length_ } }; 应改为 json result = { { "type", type_ }, { "length", length_ } };

cyanray commented 2 years ago

完了,怎么会这样呢……

Numendacil commented 1 year ago

155