From 3d175ced09894c3536ae3eda042387590f476772 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 22 Aug 2020 17:03:25 -0700 Subject: [PATCH] modules/console: Add stub for group and node derived command handling. --- modules/console.cc | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/modules/console.cc b/modules/console.cc index 2ebf7d339..885f02885 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -249,6 +249,8 @@ bool console_id__user(opt &, const m::user::id &id, const string_view &line); bool console_id__room(opt &, const m::room::id &id, const string_view &line); bool console_id__event(opt &, const m::event::id &id, const string_view &line); bool console_id__device(opt &, const m::device::id &id, const string_view &line); +bool console_id__group(opt &, const m::id::group &, const string_view &line); +bool console_id__node(opt &, const string_view &id, const string_view &line); bool console_json(const json::object &); int @@ -297,6 +299,12 @@ console_command_derived(opt &out, const string_view &line) case m::id::DEVICE: return console_id__device(out, id, line); + case m::id::GROUP: + return console_id__group(out, id, line); + + case m::id::NODE: + return console_id__node(out, id, line); + case m::id::ROOM_ALIAS: { const auto room_id{m::room_id(id)}; @@ -13033,6 +13041,25 @@ console_cmd__user__typing(opt &out, const string_view &line) // node // +bool +console_cmd__node(opt &out, const string_view &line) +{ + const params param{line, " ", + { + "node_id" + }}; + + return true; +} + +bool +console_id__node(opt &out, + const string_view &id, + const string_view &line) +{ + return console_cmd__node(out, line); +} + bool console_cmd__node__keys(opt &out, const string_view &line) { @@ -16005,3 +16032,26 @@ console_cmd__icu(opt &out, const string_view &line) return true; } + +// +// group +// + +bool +console_cmd__group(opt &out, const string_view &line) +{ + const params param{line, " ", + { + "group_id" + }}; + + return true; +} + +bool +console_id__group(opt &out, + const m::id::group &id, + const string_view &line) +{ + return console_cmd__group(out, line); +}