mirror of
https://github.com/matrix-construct/construct
synced 2024-12-30 17:34:04 +01:00
modules/console: Sort fed event_auth output by depth.
This commit is contained in:
parent
9df6d127af
commit
130c4970b6
1 changed files with 10 additions and 2 deletions
|
@ -2691,8 +2691,16 @@ console_cmd__fed__event_auth(opt &out, const string_view &line)
|
||||||
request
|
request
|
||||||
};
|
};
|
||||||
|
|
||||||
for(const json::object &event : auth_chain)
|
std::vector<m::event> events(size(auth_chain));
|
||||||
out << pretty_oneline(m::event{event}) << std::endl;
|
std::transform(begin(auth_chain), end(auth_chain), begin(events), []
|
||||||
|
(const json::object &event) -> m::event
|
||||||
|
{
|
||||||
|
return event;
|
||||||
|
});
|
||||||
|
|
||||||
|
std::sort(begin(events), end(events));
|
||||||
|
for(const auto &event : events)
|
||||||
|
out << pretty_oneline(event) << std::endl;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue