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:
parent
1a5f27a2de
commit
1677137440
1 changed files with 14 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue