Make in_reply_to in RelatesTo optional
This commit is contained in:
parent
d5d2d1d893
commit
39c36176a6
@ -14,7 +14,7 @@ Breaking changes:
|
|||||||
* Add PDU types: `pdu::{Pdu, PduStub}`
|
* Add PDU types: `pdu::{Pdu, PduStub}`
|
||||||
* `presence::PresenceState` has been moved. Import it from `ruma` or `ruma-common`.
|
* `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`.
|
* `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:
|
Improvements:
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ pub struct VideoInfo {
|
|||||||
pub struct RelatesTo {
|
pub struct RelatesTo {
|
||||||
/// Information about another message being replied to.
|
/// Information about another message being replied to.
|
||||||
#[serde(rename = "m.in_reply_to")]
|
#[serde(rename = "m.in_reply_to")]
|
||||||
pub in_reply_to: InReplyTo,
|
pub in_reply_to: Option<InReplyTo>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Information about the event a "rich reply" is replying to.
|
/// 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(),
|
body: "> <@test:example.com> test\n\ntest reply".to_owned(),
|
||||||
formatted: None,
|
formatted: None,
|
||||||
relates_to: Some(RelatesTo {
|
relates_to: Some(RelatesTo {
|
||||||
in_reply_to: InReplyTo {
|
in_reply_to: Some(InReplyTo {
|
||||||
event_id: EventId::try_from("$15827405538098VGFWH:example.com").unwrap(),
|
event_id: EventId::try_from("$15827405538098VGFWH:example.com").unwrap(),
|
||||||
},
|
}),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user