sneak in serializer json stuff (header only, no dep tracking)

This commit is contained in:
Green Sky 2024-04-14 14:20:52 +02:00
parent ce81ef7cf7
commit 36763c3c8f
No known key found for this signature in database
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#pragma once
#include <solanaceae/tox_messages/components.hpp>
#include <nlohmann/json.hpp>
namespace Message::Components {
// TODO: friend msg id, does not have the same qualities
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ToxGroupMessageID, id)
// TODO: transfer stuff, needs content rewrite
} // Message::Components

View File

@ -0,0 +1,9 @@
#pragma once
#include <solanaceae/message3/message_serializer.hpp>
inline void registerToxMessageComponents(MessageSerializerNJ& msnj) {
msnj.registerSerializer<Message::Components::ToxGroupMessageID>();
msnj.registerDeserializer<Message::Components::ToxGroupMessageID>();
}