diff --git a/include/ircd/m/v1/state.h b/include/ircd/m/v1/state.h index 8d30f3ad0..7bca03d9d 100644 --- a/include/ircd/m/v1/state.h +++ b/include/ircd/m/v1/state.h @@ -35,6 +35,7 @@ struct ircd::m::v1::state::opts { net::hostport remote; string_view event_id; + bool ids_only {false}; m::request request; server::out out; server::in in; diff --git a/ircd/m/v1.cc b/ircd/m/v1.cc index c6c170548..2ade7ad79 100644 --- a/ircd/m/v1.cc +++ b/ircd/m/v1.cc @@ -310,7 +310,8 @@ ircd::m::v1::state::state(const room::id &room_id, thread_local char urlbuf[2048], ridbuf[768], eidbuf[768]; json::get<"uri"_>(opts.request) = fmt::sprintf { - urlbuf, "/_matrix/federation/v1/state/%s/?event_id=%s", + urlbuf, "/_matrix/federation/v1/%s/%s/?event_id=%s", + opts.ids_only? "state_ids" : "state", url::encode(room_id, ridbuf), url::encode(opts.event_id, eidbuf), };