0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-28 19:58:53 +02:00

modules/console: Update the room head cmd.

This commit is contained in:
Jason Volk 2018-05-04 20:48:43 -07:00
parent ab2490ce73
commit f320cbf05d

View file

@ -2560,7 +2560,22 @@ console_cmd__room__head(opt &out, const string_view &line)
room_id
};
out << head(room_id) << std::endl;
const m::room::head head
{
room
};
head.for_each([&out]
(const m::event::idx &event_idx, const m::event::id &event_id)
{
const m::event::fetch event
{
event_idx, std::nothrow
};
out << pretty_oneline(event) << std::endl;
});
return true;
}