mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
modules/console: cmd to iterate through room state type-strings only.
This commit is contained in:
parent
3a4817354e
commit
351a726ac5
1 changed files with 33 additions and 0 deletions
|
@ -4689,6 +4689,39 @@ console_cmd__room__state(opt &out, const string_view &line)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
console_cmd__room__state__types(opt &out, const string_view &line)
|
||||
{
|
||||
const auto &room_id
|
||||
{
|
||||
m::room_id(token(line, ' ', 0))
|
||||
};
|
||||
|
||||
const auto &event_id
|
||||
{
|
||||
token(line, ' ', 1, {})
|
||||
};
|
||||
|
||||
const m::room room
|
||||
{
|
||||
room_id, event_id
|
||||
};
|
||||
|
||||
const m::room::state state
|
||||
{
|
||||
room
|
||||
};
|
||||
|
||||
state.for_each(m::room::state::types{[&out]
|
||||
(const string_view &type)
|
||||
{
|
||||
out << type << std::endl;
|
||||
return true;
|
||||
}});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
console_cmd__room__state__force(opt &out, const string_view &line)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue