From af07bfb8f4d9c6ccadad6a6bf345afd27d5806b4 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 11 May 2022 14:06:01 +0200 Subject: [PATCH] events: Improve deprecation note for fields deprecated by MSC3700 --- crates/ruma-common/src/events/room/encrypted.rs | 10 ++++++++-- crates/ruma-common/src/events/room_key_request.rs | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/crates/ruma-common/src/events/room/encrypted.rs b/crates/ruma-common/src/events/room/encrypted.rs index b3036048..3c58687a 100644 --- a/crates/ruma-common/src/events/room/encrypted.rs +++ b/crates/ruma-common/src/events/room/encrypted.rs @@ -264,11 +264,17 @@ pub struct MegolmV1AesSha2Content { pub ciphertext: String, /// The Curve25519 key of the sender. - #[cfg_attr(feature = "unstable-msc3700", deprecated = "as of Matrix v1.3")] + #[cfg_attr( + feature = "unstable-msc3700", + deprecated = "this field still needs to be sent but should not be used when received" + )] pub sender_key: String, /// The ID of the sending device. - #[cfg_attr(feature = "unstable-msc3700", deprecated = "as of Matrix v1.3")] + #[cfg_attr( + feature = "unstable-msc3700", + deprecated = "this field still needs to be sent but should not be used when received" + )] pub device_id: OwnedDeviceId, /// The ID of the session used to encrypt the message. diff --git a/crates/ruma-common/src/events/room_key_request.rs b/crates/ruma-common/src/events/room_key_request.rs index e21c251c..b3ab9581 100644 --- a/crates/ruma-common/src/events/room_key_request.rs +++ b/crates/ruma-common/src/events/room_key_request.rs @@ -81,7 +81,10 @@ pub struct RequestedKeyInfo { pub room_id: OwnedRoomId, /// The Curve25519 key of the device which initiated the session originally. - #[cfg_attr(feature = "unstable-msc3700", deprecated = "as of Matrix v1.3")] + #[cfg_attr( + feature = "unstable-msc3700", + deprecated = "this field still needs to be sent but should not be used when received" + )] pub sender_key: String, /// The ID of the session that the key is for.