From 06e381ce2b4b07dbb7afafcb8428f46070096a9d Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 12 Apr 2019 00:52:29 -0700 Subject: [PATCH] ircd::m::feds: Use a misc arg vector of string_view's. --- include/ircd/m/feds.h | 2 +- modules/console.cc | 2 +- modules/federation/federation.cc | 2 +- modules/s_fetch.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ircd/m/feds.h b/include/ircd/m/feds.h index 80a4ffc1a..d981b0b9c 100644 --- a/include/ircd/m/feds.h +++ b/include/ircd/m/feds.h @@ -50,5 +50,5 @@ struct ircd::m::feds::opts m::room::id room_id; m::event::id event_id; m::user::id user_id; - bool ids {false}; + string_view arg[4]; // misc argv }; diff --git a/modules/console.cc b/modules/console.cc index 82ece569b..653f517c2 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -10093,7 +10093,7 @@ console_cmd__feds__state(opt &out, const string_view &line) opts.timeout = out.timeout; opts.event_id = event_id; opts.room_id = room_id; - opts.ids = true; + opts.arg[0] = "ids"; m::feds::state(opts, closure); diff --git a/modules/federation/federation.cc b/modules/federation/federation.cc index c654628bc..a75859d74 100644 --- a/modules/federation/federation.cc +++ b/modules/federation/federation.cc @@ -89,7 +89,7 @@ ircd::m::feds::state(const opts &opts, { m::v1::state::opts v1opts; v1opts.dynamic = true; - v1opts.ids_only = opts.ids; + v1opts.ids_only = opts.arg[0] == "ids"; v1opts.event_id = opts.event_id; v1opts.remote = string_view { diff --git a/modules/s_fetch.cc b/modules/s_fetch.cc index da27dc5c9..76d0d73d9 100644 --- a/modules/s_fetch.cc +++ b/modules/s_fetch.cc @@ -188,7 +188,7 @@ ircd::m::fetch::state_ids(const room &room) m::feds::opts opts; opts.room_id = room.room_id; opts.event_id = room.event_id; - opts.ids = true; + opts.arg[0] = "ids"; m::feds::state(opts, [&room](const auto &result) { try