mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
modules/federation/federation: Improve feds head output.
This commit is contained in:
parent
65786b77ea
commit
8432d022f5
1 changed files with 16 additions and 3 deletions
|
@ -243,9 +243,22 @@ feds__head(const m::room::id &room_id,
|
|||
{
|
||||
const auto code{req.get()};
|
||||
const json::object &response{req};
|
||||
out << "+ " << std::setw(40) << std::left << req.origin
|
||||
<< " " << string_view{response}
|
||||
<< std::endl;
|
||||
const json::array prev_events
|
||||
{
|
||||
response.at({"event", "prev_events"})
|
||||
};
|
||||
|
||||
out << "+ " << std::setw(40) << std::left << req.origin;
|
||||
for(const json::array prev_event : prev_events)
|
||||
{
|
||||
const auto &prev_event_id
|
||||
{
|
||||
unquote(prev_event.at(0))
|
||||
};
|
||||
|
||||
out << " " << string_view{prev_event_id};
|
||||
};
|
||||
out << std::endl;
|
||||
}
|
||||
else cancel(req);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue