From b60df453dca627a158e13b4bc5c133f40af1f58b Mon Sep 17 00:00:00 2001 From: gnieto Date: Tue, 9 Nov 2021 22:09:48 +0100 Subject: [PATCH] federation-api: Remove unneeded parameter on `get_remote_server_keys_batch` The `minimum_valid_until_ts` parameter is not needed on this endpoint (https://matrix.org/docs/spec/server_server/r0.1.4#post-matrix-key-v2-query). --- crates/ruma-federation-api/CHANGELOG.md | 1 + .../discovery/get_remote_server_keys_batch/v2.rs | 13 ++----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/crates/ruma-federation-api/CHANGELOG.md b/crates/ruma-federation-api/CHANGELOG.md index a24495c2..6b5e5e4b 100644 --- a/crates/ruma-federation-api/CHANGELOG.md +++ b/crates/ruma-federation-api/CHANGELOG.md @@ -5,6 +5,7 @@ Breaking changes: * Replace `Raw` with `Box` or `&RawJsonValue` * Borrow more request fields * Make `device_display_name` field optional in `DeviceListUpdateContent` and update constructor accordingly +* Remove unneeded `minimum_valid_until_ts` query parameter from `get_remote_server_keys_batch` endpoint # 0.3.1 diff --git a/crates/ruma-federation-api/src/discovery/get_remote_server_keys_batch/v2.rs b/crates/ruma-federation-api/src/discovery/get_remote_server_keys_batch/v2.rs index a340b416..ceefdc38 100644 --- a/crates/ruma-federation-api/src/discovery/get_remote_server_keys_batch/v2.rs +++ b/crates/ruma-federation-api/src/discovery/get_remote_server_keys_batch/v2.rs @@ -20,14 +20,6 @@ ruma_api! { } request: { - /// The time until which the returned certificates will need to be valid to be useful to - /// the requesting server. - /// - /// If not supplied, the current time as determined by the notary server is used. - #[ruma_api(query)] - #[serde(default = "MilliSecondsSinceUnixEpoch::now")] - pub minimum_valid_until_ts: MilliSecondsSinceUnixEpoch, - /// The query criteria. /// /// The outer string key on the object is the server name (eg: matrix.org). The inner @@ -47,12 +39,11 @@ ruma_api! { } impl Request { - /// Creates a new `Request` with the given query criteria and `minimum_valid_until` timestamp. + /// Creates a new `Request` with the given query criteria. pub fn new( server_keys: BTreeMap>, - minimum_valid_until_ts: MilliSecondsSinceUnixEpoch, ) -> Self { - Self { server_keys, minimum_valid_until_ts } + Self { server_keys } } }