From 803fdc52f72a1fc62525b5d661ed8d9dc6b679a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Wed, 14 Dec 2022 12:59:45 +0100 Subject: [PATCH] client-api: Clarify that get_context always returns 'event' even if limit is zero --- crates/ruma-client-api/src/context/get_context.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ruma-client-api/src/context/get_context.rs b/crates/ruma-client-api/src/context/get_context.rs index ff84f16c..2686ca9c 100644 --- a/crates/ruma-client-api/src/context/get_context.rs +++ b/crates/ruma-client-api/src/context/get_context.rs @@ -39,7 +39,10 @@ pub mod v3 { #[ruma_api(path)] pub event_id: OwnedEventId, - /// The maximum number of events to return. + /// The maximum number of context events to return. + /// + /// This limit applies to the sum of the `events_before` and `events_after` arrays. The + /// requested event ID is always returned in `event` even if the limit is `0`. /// /// Defaults to 10. #[ruma_api(query)]