diff --git a/ruma-events/CHANGELOG.md b/ruma-events/CHANGELOG.md index ad9b8370..1eb75130 100644 --- a/ruma-events/CHANGELOG.md +++ b/ruma-events/CHANGELOG.md @@ -14,7 +14,7 @@ Breaking changes: * Add PDU types: `pdu::{Pdu, PduStub}` * `presence::PresenceState` has been moved. Import it from `ruma` or `ruma-common`. * `EventJson` has been moved and renamed. Import it from `ruma` or `ruma-common`. - +* The `in_reply_to` field of `room::message::RelatesTo` is now optional Improvements: diff --git a/ruma-events/src/room/message.rs b/ruma-events/src/room/message.rs index ef9ce944..f5a6f992 100644 --- a/ruma-events/src/room/message.rs +++ b/ruma-events/src/room/message.rs @@ -381,7 +381,7 @@ pub struct VideoInfo { pub struct RelatesTo { /// Information about another message being replied to. #[serde(rename = "m.in_reply_to")] - pub in_reply_to: InReplyTo, + pub in_reply_to: Option, } /// Information about the event a "rich reply" is replying to. @@ -517,9 +517,9 @@ mod tests { body: "> <@test:example.com> test\n\ntest reply".to_owned(), formatted: None, relates_to: Some(RelatesTo { - in_reply_to: InReplyTo { + in_reply_to: Some(InReplyTo { event_id: EventId::try_from("$15827405538098VGFWH:example.com").unwrap(), - }, + }), }), });