From 89d12fa48a3e99a415fb3c57818ab924f4297dab Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 30 May 2023 11:00:06 +0200 Subject: [PATCH] client-api: Add `conn_id` to sync v4 request parameters Signed-off-by: Benjamin Bouvier --- crates/ruma-client-api/src/sync/sync_events/v4.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 e5d8d264..fc3b104c 100644 --- a/crates/ruma-client-api/src/sync/sync_events/v4.rs +++ b/crates/ruma-client-api/src/sync/sync_events/v4.rs @@ -61,6 +61,18 @@ pub struct Request { #[serde(skip_serializing_if = "Option::is_none")] pub delta_token: Option, + /// A unique string identifier for this connection to the server. + /// + /// Optional. If this is missing, only one sliding sync connection can be made to the server at + /// any one time. Clients need to set this to allow more than one connection concurrently, + /// so the server can distinguish between connections. This is NOT STICKY and must be + /// provided with every request, if your client needs more than one concurrent connection. + /// + /// Limitation: it must not contain more than 16 chars, due to it being required with every + /// request. + #[serde(skip_serializing_if = "Option::is_none")] + pub conn_id: Option, + /// Allows clients to know what request params reached the server, /// functionally similar to txn IDs on /send for events. #[serde(skip_serializing_if = "Option::is_none")]