0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

modules/console: Add a cmd to trigger the present state reindexer for a room.

This commit is contained in:
Jason Volk 2018-05-13 19:16:34 -07:00
parent 5590238b1f
commit 69debc0d2b

View file

@ -2937,6 +2937,34 @@ console_cmd__room__state(opt &out, const string_view &line)
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
console_cmd__room__count(opt &out, const string_view &line)
{