mirror of
https://github.com/matrix-construct/construct
synced 2025-04-29 13:04:17 +02:00
modules/console: Add shortcut for 'room get ...' cmd w/ direct 'room_id type state_key'
This commit is contained in:
parent
4680847081
commit
becd247de3
1 changed files with 18 additions and 9 deletions
|
@ -8556,15 +8556,6 @@ console_cmd__room__top(opt &out, const string_view &line)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
console_id__room(opt &out,
|
||||
const m::room::id &id,
|
||||
const string_view &line)
|
||||
{
|
||||
//TODO: XXX more detailed summary
|
||||
return console_cmd__room__top(out, line);
|
||||
}
|
||||
|
||||
bool
|
||||
console_cmd__room__version(opt &out, const string_view &line)
|
||||
{
|
||||
|
@ -11185,6 +11176,24 @@ console_cmd__room__power__revoke(opt &out, const string_view &line)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
console_id__room(opt &out,
|
||||
const m::room::id &id,
|
||||
const string_view &line)
|
||||
{
|
||||
const params param{line, " ",
|
||||
{
|
||||
"room_id", "type", "state_key"
|
||||
}};
|
||||
|
||||
// Delegate to allow direct command "#foo:bar.com ircd.test fookey"
|
||||
if(param["type"] && param["state_key"])
|
||||
return console_cmd__room__get(out, line);
|
||||
|
||||
//TODO: XXX more detailed summary
|
||||
return console_cmd__room__top(out, line);
|
||||
}
|
||||
|
||||
//
|
||||
// user
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue