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 33e5ba29..d6e3b666 100644 --- a/crates/ruma-client-api/src/sync/sync_events/v4.rs +++ b/crates/ruma-client-api/src/sync/sync_events/v4.rs @@ -13,7 +13,7 @@ use ruma_common::{ events::{ receipt::SyncReceiptEvent, typing::SyncTypingEvent, AnyGlobalAccountDataEvent, AnyRoomAccountDataEvent, AnyStrippedStateEvent, AnySyncStateEvent, AnySyncTimelineEvent, - AnyToDeviceEvent, StateEventType, + AnyToDeviceEvent, StateEventType, TimelineEventType, }, metadata, serde::{duration::opt_ms, Raw}, @@ -76,6 +76,16 @@ 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,