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:
parent
9e2b9ed8da
commit
8888392768
1 changed files with 14 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue