diff --git a/modules/console.cc b/modules/console.cc index 7fc6f4a7e..5eb39b4df 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -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 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) {