From 463904db31f7569a33081c1c5d4972877e02a6e0 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Fri, 27 Sep 2024 08:16:47 +0200 Subject: [PATCH] client-api: Remove `sync::v5::Response::initial`. (#1913) This patch removes the `initial` field from the `Response` for MSC4186. There is no top-level `initial` value. This field exists for `response::Room` though. --- crates/ruma-client-api/src/sync/sync_events/v5.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crates/ruma-client-api/src/sync/sync_events/v5.rs b/crates/ruma-client-api/src/sync/sync_events/v5.rs index 24e7f1bd..095f9ae4 100644 --- a/crates/ruma-client-api/src/sync/sync_events/v5.rs +++ b/crates/ruma-client-api/src/sync/sync_events/v5.rs @@ -420,10 +420,6 @@ pub mod request { /// Response type for the `/sync` endpoint. #[response(error = crate::Error)] pub struct Response { - /// Whether this response describes an initial sync. - #[serde(default, skip_serializing_if = "ruma_common::serde::is_default")] - pub initial: bool, - /// Matches the `txn_id` sent by the request (see [`Request::txn_id`]). #[serde(skip_serializing_if = "Option::is_none")] pub txn_id: Option, @@ -449,7 +445,6 @@ impl Response { /// Creates a new `Response` with the given `pos`. pub fn new(pos: String) -> Self { Self { - initial: Default::default(), txn_id: None, pos, lists: Default::default(), @@ -737,7 +732,6 @@ impl From for Response { fn from(value: v4::Response) -> Self { Self { pos: value.pos, - initial: value.initial, txn_id: value.txn_id, lists: value.lists.into_iter().map(|(room_id, list)| (room_id, list.into())).collect(), rooms: value.rooms.into_iter().map(|(room_id, room)| (room_id, room.into())).collect(),