mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 23:10:54 +01:00
modules/console: Update the room head cmd.
This commit is contained in:
parent
ab2490ce73
commit
f320cbf05d
1 changed files with 16 additions and 1 deletions
|
@ -2560,7 +2560,22 @@ console_cmd__room__head(opt &out, const string_view &line)
|
||||||
room_id
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue