From e3282d8bfebc69d2e64815105ebe9dced130b94a Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 1 Jun 2023 19:24:05 +0200 Subject: [PATCH] client-api: Move the sync v4 `bump_event_types` field to the list request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … as it's now per-list. Signed-off-by: Benjamin Bouvier --- .../src/sync/sync_events/v4.rs | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/crates/ruma-client-api/src/sync/sync_events/v4.rs b/crates/ruma-client-api/src/sync/sync_events/v4.rs index fc3b104c..228cfbd7 100644 --- a/crates/ruma-client-api/src/sync/sync_events/v4.rs +++ b/crates/ruma-client-api/src/sync/sync_events/v4.rs @@ -88,16 +88,6 @@ pub struct Request { #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub lists: BTreeMap, - /// An allow-list of event types which should be considered recent activity when sorting - /// `by_recency`. By omitting event types from this field, clients can ensure that - /// uninteresting events (e.g. a profil rename) do not cause a room to jump to the top of its - /// list(s). Empty or omitted `bump_event_types` have no effect; all events in a room will be - /// considered recent activity. - /// - /// This is currently per-connection, not per-list. Sticky. - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub bump_event_types: Vec, - /// Specific rooms and event types that we want to receive events from. #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub room_subscriptions: BTreeMap, @@ -309,6 +299,19 @@ pub struct SyncRequestList { /// Filters to apply to the list before sorting. Sticky. #[serde(skip_serializing_if = "Option::is_none")] pub filters: Option, + + /// An allow-list of event types which should be considered recent activity when sorting + /// `by_recency`. By omitting event types from this field, clients can ensure that + /// uninteresting events (e.g. a profil rename) do not cause a room to jump to the top of its + /// list(s). Empty or omitted `bump_event_types` have no effect; all events in a room will be + /// considered recent activity. + /// + /// NB. Changes to bump_event_types will NOT cause the room list to be reordered; + /// it will only affect the ordering of rooms due to future updates. + /// + /// Sticky. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub bump_event_types: Vec, } /// Configuration for requesting room details.