0
0
Fork 0
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:
Jason Volk 2018-04-08 12:52:27 -07:00
parent 9df6d127af
commit 130c4970b6

View file

@ -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;
} }