mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd:Ⓜ️:v1: event_auth convenience conversion; fed event_auth output.
This commit is contained in:
parent
99ce3232d4
commit
9df6d127af
2 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue