0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-01 21:28:53 +02:00

ircd:Ⓜ️:v1: event_auth convenience conversion; fed event_auth output.

This commit is contained in:
Jason Volk 2018-04-08 12:45:05 -07:00
parent 99ce3232d4
commit 9df6d127af
2 changed files with 7 additions and 4 deletions

View file

@ -21,9 +21,10 @@ struct ircd::m::v1::event_auth
{
struct opts;
explicit operator json::object() const
explicit operator json::array() const
{
return json::object{in.content};
const json::object object{in.content};
return object.at("auth_chain");
}
event_auth(const m::room::id &, const m::event::id &, const mutable_buffer &, opts);

View file

@ -2686,12 +2686,14 @@ console_cmd__fed__event_auth(opt &out, const string_view &line)
request.wait(out.timeout);
request.get();
const json::object &response
const json::array &auth_chain
{
request
};
out << string_view{response} << std::endl;
for(const json::object &event : auth_chain)
out << pretty_oneline(m::event{event}) << std::endl;
return true;
}