From f320cbf05d1d13bf8bf5598f185b5c4431944277 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 4 May 2018 20:48:43 -0700 Subject: [PATCH] modules/console: Update the room head cmd. --- modules/console.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/console.cc b/modules/console.cc index 7516987a4..3b1a21e82 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -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; }