From 00980b547e0c4051e2511721d5b65d3bea617993 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 24 Mar 2020 17:48:03 -0700 Subject: [PATCH] modules/console: Add prefix-option in room type cmd. --- modules/console.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/console.cc b/modules/console.cc index 6ee8862c3..0d2efc87a 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -10389,12 +10389,17 @@ console_cmd__room__type(opt &out, const string_view &line) param.at(3, -1L) }; + const bool prefix_match + { + endswith(type, "...") + }; + const m::room::type events { - room_id, type, - { - start_depth, end_depth - } + room_id, + rstrip(type, "..."), + { start_depth, end_depth }, + prefix_match }; m::event::fetch event;