events: Stabilize MSC3700
This commit is contained in:
parent
a940de9e41
commit
6bee869b66
@ -28,6 +28,7 @@ Improvements:
|
||||
* Add unstable support for Improved Signalling for 1:1 VoIP (MSC2746)
|
||||
* Add support for knocking in `events::room::member::MembershipChange`
|
||||
* Add `MatrixVersion::V1_3`
|
||||
* Deprecate the `sender_key` and `device_id` fields for encrypted events (MSC3700)
|
||||
|
||||
# 0.9.2
|
||||
|
||||
|
@ -47,7 +47,6 @@ unstable-msc3551 = ["unstable-msc1767"]
|
||||
unstable-msc3552 = ["unstable-msc3551"]
|
||||
unstable-msc3553 = ["unstable-msc3552"]
|
||||
unstable-msc3554 = ["unstable-msc1767"]
|
||||
unstable-msc3700 = []
|
||||
|
||||
[dependencies]
|
||||
base64 = "0.13.0"
|
||||
|
@ -264,17 +264,11 @@ pub struct MegolmV1AesSha2Content {
|
||||
pub ciphertext: String,
|
||||
|
||||
/// The Curve25519 key of the sender.
|
||||
#[cfg_attr(
|
||||
feature = "unstable-msc3700",
|
||||
deprecated = "this field still needs to be sent but should not be used when received"
|
||||
)]
|
||||
#[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 = "this field still needs to be sent but should not be used when received"
|
||||
)]
|
||||
#[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.
|
||||
@ -317,7 +311,7 @@ mod tests {
|
||||
use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
|
||||
|
||||
use super::{
|
||||
EncryptedEventScheme, InReplyTo, MegolmV1AesSha2Content, Relation,
|
||||
EncryptedEventScheme, InReplyTo, MegolmV1AesSha2ContentInit, Relation,
|
||||
RoomEncryptedEventContent,
|
||||
};
|
||||
use crate::{event_id, serde::Raw};
|
||||
@ -325,12 +319,15 @@ mod tests {
|
||||
#[test]
|
||||
fn serialization() {
|
||||
let key_verification_start_content = RoomEncryptedEventContent {
|
||||
scheme: EncryptedEventScheme::MegolmV1AesSha2(MegolmV1AesSha2Content {
|
||||
scheme: EncryptedEventScheme::MegolmV1AesSha2(
|
||||
MegolmV1AesSha2ContentInit {
|
||||
ciphertext: "ciphertext".into(),
|
||||
sender_key: "sender_key".into(),
|
||||
device_id: "device_id".into(),
|
||||
session_id: "session_id".into(),
|
||||
}),
|
||||
}
|
||||
.into(),
|
||||
),
|
||||
relates_to: Some(Relation::Reply {
|
||||
in_reply_to: InReplyTo { event_id: event_id!("$h29iv0s8:example.com").to_owned() },
|
||||
}),
|
||||
@ -353,6 +350,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(deprecated)]
|
||||
fn deserialization() {
|
||||
let json_data = json!({
|
||||
"algorithm": "m.megolm.v1.aes-sha2",
|
||||
|
@ -74,10 +74,7 @@ pub struct RequestedKeyInfo {
|
||||
pub room_id: OwnedRoomId,
|
||||
|
||||
/// The Curve25519 key of the device which initiated the session originally.
|
||||
#[cfg_attr(
|
||||
feature = "unstable-msc3700",
|
||||
deprecated = "this field still needs to be sent but should not be used when received"
|
||||
)]
|
||||
#[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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user