1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 17:23:14 +02:00

Allow use of a non-map type as the root RPC element.

This commit is contained in:
Sadie Powell
2025-02-24 03:21:42 +00:00
parent 2ccd182d2e
commit a111b40560
4 changed files with 59 additions and 41 deletions
+2 -3
View File
@@ -171,10 +171,9 @@ public:
else
yyjson_mut_obj_add_strn(doc, root, "id", request.id.c_str(), request.id.length());
if (!request.GetReplies().empty())
if (request.GetRoot())
{
auto *result = yyjson_mut_obj(doc);
SerializeMap(doc, result, request);
auto *result = SerializeElement(doc, request.GetRoot().value());
yyjson_mut_obj_add_val(doc, root, "result", result);
}