0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

modules/federation/federation: Show depth in feds head; cleanup unused returns.

This commit is contained in:
Jason Volk 2018-04-30 08:54:56 -07:00
parent c03ca13f17
commit de838e982d

View file

@ -178,8 +178,6 @@ feds__event(const m::event::id &event_id, std::ostream &out)
{
out << "- " << req.origin << " " << e.what() << std::endl;
}
return;
}
extern "C" void
@ -226,7 +224,6 @@ feds__head(const m::room::id &room_id,
catch(const std::exception &e)
{
out << "! " << origin << " " << e.what() << std::endl;
return;
}
});
@ -243,12 +240,14 @@ feds__head(const m::room::id &room_id,
{
const auto code{req.get()};
const json::object &response{req};
const json::object &event{response.at("event")};
const json::array prev_events
{
response.at({"event", "prev_events"})
event.at("prev_events")
};
out << "+ " << std::setw(40) << std::left << req.origin;
out << " " << event.at("depth");
for(const json::array prev_event : prev_events)
{
const auto &prev_event_id
@ -266,8 +265,6 @@ feds__head(const m::room::id &room_id,
{
out << "- " << req.origin << " " << e.what() << std::endl;
}
return;
}
extern "C" void