0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-01 05:08:59 +02:00

modules/console: Output room version in fed head.

This commit is contained in:
Jason Volk 2019-07-15 14:32:28 -07:00
parent 2906eebd3f
commit 20081ce5c1

View file

@ -11656,6 +11656,14 @@ console_cmd__fed__head(opt &out, const string_view &line)
proto["event"]
};
out << "VERSION "
<< proto["room_version"]
<< std::endl;
out << "DEPTH "
<< event["depth"]
<< std::endl;
const m::event::prev prev{event};
for(size_t i(0); i < prev.auth_events_count(); ++i)
{
@ -11664,7 +11672,7 @@ console_cmd__fed__head(opt &out, const string_view &line)
prev.auth_event(i)
};
out << "AUTH " << id << " " << std::endl;
out << "AUTH " << id << " " << std::endl;
}
for(size_t i(0); i < prev.prev_events_count(); ++i)
@ -11674,13 +11682,9 @@ console_cmd__fed__head(opt &out, const string_view &line)
prev.prev_event(i)
};
out << "PREV " << id << " " << std::endl;
out << "PREV " << id << " " << std::endl;
}
out << "DEPTH "
<< event["depth"]
<< std::endl;
return true;
}