1
0
mirror of https://github.com/uowuo/abaddon.git synced 2025-03-04 03:03:16 -05:00

add missing create message fields

This commit is contained in:
ouwou 2025-01-30 19:57:15 -05:00
parent 15751fda06
commit eb9a519b12
2 changed files with 4 additions and 0 deletions

View File

@ -315,6 +315,8 @@ void to_json(nlohmann::json &j, const CreateMessageAttachmentObject &m) {
void to_json(nlohmann::json &j, const CreateMessageObject &m) { void to_json(nlohmann::json &j, const CreateMessageObject &m) {
j["content"] = m.Content; j["content"] = m.Content;
j["flags"] = m.Flags; j["flags"] = m.Flags;
j["mobile_network_type"] = m.MobileNetworkType;
j["tts"] = m.IsTTS;
JS_IF("attachments", m.Attachments); JS_IF("attachments", m.Attachments);
JS_IF("message_reference", m.MessageReference); JS_IF("message_reference", m.MessageReference);
JS_IF("nonce", m.Nonce); JS_IF("nonce", m.Nonce);

View File

@ -448,6 +448,8 @@ struct CreateMessageAttachmentObject {
struct CreateMessageObject { struct CreateMessageObject {
std::string Content; std::string Content;
MessageFlags Flags = MessageFlags::NONE; MessageFlags Flags = MessageFlags::NONE;
bool IsTTS = false;
std::string MobileNetworkType = "unknown";
std::optional<MessageReferenceData> MessageReference; std::optional<MessageReferenceData> MessageReference;
std::optional<std::string> Nonce; std::optional<std::string> Nonce;
std::optional<std::vector<CreateMessageAttachmentObject>> Attachments; std::optional<std::vector<CreateMessageAttachmentObject>> Attachments;