0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-16 15:00:51 +01:00

modules/client/keys/query: Break up large json::stack append.

This commit is contained in:
Jason Volk 2019-08-23 18:30:47 -07:00
parent 1a5f27a2de
commit 1677137440

View file

@ -264,14 +264,23 @@ try
response["device_keys"]
};
for(const auto &m : device_keys)
for(const auto &[_user_id, device_keys] : device_keys)
{
const m::user::id &user_id(m.first);
const json::object &device_keys(m.second);
json::stack::member
const m::user::id &user_id
{
object, user_id, device_keys
_user_id
};
json::stack::object user_object
{
object, user_id
};
for(const auto &[device_id, keys] : json::object(device_keys))
json::stack::member
{
user_object, device_id, keys
};
}
}
catch(const std::exception &e)