0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-14 00:34:18 +01:00

modules/console: Add recent events to room top.

This commit is contained in:
Jason Volk 2019-08-04 22:50:40 -07:00
parent 9e2b9ed8da
commit 8888392768

View file

@ -7626,6 +7626,8 @@ console_cmd__rooms__fetch(opt &out, const string_view &line)
// room
//
bool console_cmd__room__events(opt &out, const string_view &line);
bool
console_cmd__room__top(opt &out, const string_view &line)
{
@ -7685,6 +7687,18 @@ console_cmd__room__top(opt &out, const string_view &line)
return true;
}});
out << "\nrecent events:"
<< std::endl;
char linebuf[256];
static const size_t last_count(4);
console_cmd__room__events(out, fmt::sprintf
{
linebuf, "%s -%ld",
string_view{room_id},
last_count,
});
return true;
}