mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
modules/client/sync/to_device: Elide device_id in event; simplify.
This commit is contained in:
parent
38f5b6e477
commit
5baf053423
1 changed files with 2 additions and 13 deletions
|
@ -134,22 +134,11 @@ ircd::m::sync::_to_device_append(data &data,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
json::stack::object _content
|
|
||||||
{
|
|
||||||
event, "content"
|
|
||||||
};
|
|
||||||
|
|
||||||
json::stack::member
|
json::stack::member
|
||||||
{
|
{
|
||||||
_content, "device_id", json::string
|
event, "content", json::object
|
||||||
{
|
{
|
||||||
content.at("device_id")
|
content.at("content")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for(const auto &[key, val] : json::object(content.at("content")))
|
|
||||||
json::stack::member
|
|
||||||
{
|
|
||||||
_content, key, val
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue