client-api: Stabilize support for private read receipts
This commit is contained in:
		
							parent
							
								
									f068c3fb5a
								
							
						
					
					
						commit
						489820303e
					
				| @ -4,6 +4,8 @@ Breaking changes: | ||||
| 
 | ||||
| * Remove `sync::sync_events::v3::DeviceLists` re-export | ||||
|   * Use `sync::sync_events::DeviceLists` instead | ||||
| * `fully_read` field in `read_marker::set_read_marker` is no longer required | ||||
|   * Remove the `fully_read` argument from `read_marker::set_read_marker::Request::new` | ||||
| 
 | ||||
| Improvements: | ||||
| 
 | ||||
| @ -11,6 +13,7 @@ Improvements: | ||||
| * Remove the `unstable-msc3440` feature | ||||
|   * The fields added to `RoomEventFilter` were removed by MSC3856 | ||||
| * Add support for the threads list API (MSC3856 / Matrix 1.4) | ||||
| * Stabilize support for private read receipts | ||||
| 
 | ||||
| # 0.15.1 | ||||
| 
 | ||||
|  | ||||
| @ -19,7 +19,6 @@ rustdoc-args = ["--cfg", "docsrs"] | ||||
| compat = [] | ||||
| unstable-exhaustive-types = [] | ||||
| unstable-msc2246 = [] | ||||
| unstable-msc2285 = [] | ||||
| unstable-msc2666 = [] | ||||
| unstable-msc2448 = [] | ||||
| unstable-msc2654 = [] | ||||
|  | ||||
| @ -28,15 +28,6 @@ pub mod v3 { | ||||
|             #[ruma_api(path)] | ||||
|             pub room_id: &'a RoomId, | ||||
| 
 | ||||
|             /// The event ID the fully-read marker should be located at.
 | ||||
|             ///
 | ||||
|             /// The event MUST belong to the room.
 | ||||
|             ///
 | ||||
|             /// With the `unstable-msc2285` feature, this field is optional.
 | ||||
|             #[cfg(not(feature = "unstable-msc2285"))] | ||||
|             #[serde(rename = "m.fully_read")] | ||||
|             pub fully_read: &'a EventId, | ||||
| 
 | ||||
|             /// The event ID the fully-read marker should be located at.
 | ||||
|             ///
 | ||||
|             /// The event MUST belong to the room.
 | ||||
| @ -44,12 +35,9 @@ pub mod v3 { | ||||
|             /// This is equivalent to calling the [`create_receipt`] endpoint with a
 | ||||
|             /// [`ReceiptType::FullyRead`].
 | ||||
|             ///
 | ||||
|             /// Without the `unstable-msc2285` feature, this field is required.
 | ||||
|             ///
 | ||||
|             /// [`create_receipt`]: crate::receipt::create_receipt
 | ||||
|             /// [`ReceiptType::FullyRead`]: crate::receipt::create_receipt::v3::ReceiptType::FullyRead
 | ||||
|             #[cfg(feature = "unstable-msc2285")] | ||||
|             #[serde(rename = "m.fully_read")] | ||||
|             #[serde(rename = "m.fully_read", skip_serializing_if = "Option::is_none")] | ||||
|             pub fully_read: Option<&'a EventId>, | ||||
| 
 | ||||
|             /// The event ID to set the public read receipt location at.
 | ||||
| @ -69,8 +57,7 @@ pub mod v3 { | ||||
|             ///
 | ||||
|             /// [`create_receipt`]: crate::receipt::create_receipt
 | ||||
|             /// [`ReceiptType::ReadPrivate`]: crate::receipt::create_receipt::v3::ReceiptType::ReadPrivate
 | ||||
|             #[cfg(feature = "unstable-msc2285")] | ||||
|             #[serde(rename = "org.matrix.msc2285.read.private", alias = "m.read.private", skip_serializing_if = "Option::is_none")] | ||||
|             #[serde(rename = "m.read.private", skip_serializing_if = "Option::is_none")] | ||||
|             pub private_read_receipt: Option<&'a EventId>, | ||||
|         } | ||||
| 
 | ||||
| @ -81,19 +68,7 @@ pub mod v3 { | ||||
|     } | ||||
| 
 | ||||
|     impl<'a> Request<'a> { | ||||
|         /// Creates a new `Request` with the given room ID and fully read event ID.
 | ||||
|         ///
 | ||||
|         /// With the `unstable-msc2285` feature, this method doesn't have the `fully_read`
 | ||||
|         /// parameter.
 | ||||
|         #[cfg(not(feature = "unstable-msc2285"))] | ||||
|         pub fn new(room_id: &'a RoomId, fully_read: &'a EventId) -> Self { | ||||
|             Self { room_id, fully_read, read_receipt: None } | ||||
|         } | ||||
| 
 | ||||
|         /// Creates a new `Request` with the given room ID.
 | ||||
|         ///
 | ||||
|         /// Without the `unstable-msc2285` feature, this method takes a `fully_read` parameter.
 | ||||
|         #[cfg(feature = "unstable-msc2285")] | ||||
|         pub fn new(room_id: &'a RoomId) -> Self { | ||||
|             Self { room_id, fully_read: None, read_receipt: None, private_read_receipt: None } | ||||
|         } | ||||
|  | ||||
| @ -70,7 +70,7 @@ pub mod v3 { | ||||
|         ///
 | ||||
|         /// This receipt is federated to other users.
 | ||||
|         ///
 | ||||
|         /// [public read receipt]: https://spec.matrix.org/v1.3/client-server-api/#receipts
 | ||||
|         /// [public read receipt]: https://spec.matrix.org/v1.4/client-server-api/#receipts
 | ||||
|         #[ruma_enum(rename = "m.read")] | ||||
|         Read, | ||||
| 
 | ||||
| @ -81,9 +81,8 @@ pub mod v3 { | ||||
|         /// This read receipt is not federated so only the user and their homeserver
 | ||||
|         /// are aware of it.
 | ||||
|         ///
 | ||||
|         /// [private read receipt]: https://github.com/matrix-org/matrix-spec-proposals/pull/2285
 | ||||
|         #[cfg(feature = "unstable-msc2285")] | ||||
|         #[ruma_enum(rename = "org.matrix.msc2285.read.private", alias = "m.read.private")] | ||||
|         /// [private read receipt]: https://spec.matrix.org/v1.4/client-server-api/#private-read-receipts
 | ||||
|         #[ruma_enum(rename = "m.read.private")] | ||||
|         ReadPrivate, | ||||
| 
 | ||||
|         /// A [fully read marker].
 | ||||
| @ -93,8 +92,7 @@ pub mod v3 { | ||||
|         /// This is actually not a receipt, but a piece of room account data. It is
 | ||||
|         /// provided here for convenience.
 | ||||
|         ///
 | ||||
|         /// [fully read marker]: https://spec.matrix.org/v1.3/client-server-api/#fully-read-markers
 | ||||
|         #[cfg(feature = "unstable-msc2285")] | ||||
|         /// [fully read marker]: https://spec.matrix.org/v1.4/client-server-api/#fully-read-markers
 | ||||
|         #[ruma_enum(rename = "m.fully_read")] | ||||
|         FullyRead, | ||||
| 
 | ||||
|  | ||||
| @ -119,10 +119,7 @@ unstable-extensible-events = [ | ||||
| ] | ||||
| unstable-msc1767 = ["ruma-common/unstable-msc1767"] | ||||
| unstable-msc2246 = ["ruma-client-api?/unstable-msc2246"] | ||||
| unstable-msc2285 = [ | ||||
|     "ruma-client-api?/unstable-msc2285", | ||||
|     "ruma-common/unstable-msc2285" | ||||
| ] | ||||
| unstable-msc2285 = ["ruma-common/unstable-msc2285"] | ||||
| unstable-msc2448 = [ | ||||
|     "ruma-client-api?/unstable-msc2448", | ||||
|     "ruma-common/unstable-msc2448", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user