mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 23:10:54 +01:00
modules/console: Add a cmd to trigger the present state reindexer for a room.
This commit is contained in:
parent
5590238b1f
commit
69debc0d2b
1 changed files with 28 additions and 0 deletions
|
@ -2937,6 +2937,34 @@ console_cmd__room__state(opt &out, const string_view &line)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
console_cmd__room__state__rebuild__present(opt &out, const string_view &line)
|
||||||
|
{
|
||||||
|
const auto &room_id
|
||||||
|
{
|
||||||
|
m::room_id(token(line, ' ', 0))
|
||||||
|
};
|
||||||
|
|
||||||
|
const m::room room
|
||||||
|
{
|
||||||
|
room_id
|
||||||
|
};
|
||||||
|
|
||||||
|
using prototype = size_t (const m::room &);
|
||||||
|
static m::import<prototype> state__rebuild_present
|
||||||
|
{
|
||||||
|
"client_rooms", "state__rebuild_present"
|
||||||
|
};
|
||||||
|
|
||||||
|
const size_t count
|
||||||
|
{
|
||||||
|
state__rebuild_present(room)
|
||||||
|
};
|
||||||
|
|
||||||
|
out << "done " << count << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
console_cmd__room__count(opt &out, const string_view &line)
|
console_cmd__room__count(opt &out, const string_view &line)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue