mirror of
https://github.com/matrix-construct/construct
synced 2024-11-19 08:21:09 +01:00
ircd:Ⓜ️:v1: Support request to /state_ids/ as option in m::v1::state.
This commit is contained in:
parent
b5060a5e46
commit
baccd4b767
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue