merge-requests/632/merge
Valentin Lorentz 3 months ago
parent eb6801290b
commit 2d8c551cd5

@ -97,7 +97,7 @@ impl PduEvent {
Ok(()) Ok(())
} }
/// Copies the `redacts` property of the event to the `content` dict /// Copies the `redacts` property of the event to the `content` dict and vice-versa.
/// ///
/// This follows the specification's /// This follows the specification's
/// [recommendation](https://spec.matrix.org/v1.10/rooms/v11/#moving-the-redacts-property-of-mroomredaction-events-to-a-content-property): /// [recommendation](https://spec.matrix.org/v1.10/rooms/v11/#moving-the-redacts-property-of-mroomredaction-events-to-a-content-property):
@ -105,6 +105,10 @@ impl PduEvent {
/// > For backwards-compatibility with older clients, servers should add a redacts /// > For backwards-compatibility with older clients, servers should add a redacts
/// > property to the top level of m.room.redaction events in when serving such events /// > property to the top level of m.room.redaction events in when serving such events
/// > over the Client-Server API. /// > over the Client-Server API.
/// >
/// > For improved compatibility with newer clients, servers should add a redacts property
/// > to the content of m.room.redaction events in older room versions when serving
/// > such events over the Client-Server API.
pub fn copy_redacts(&self) -> (Option<Arc<EventId>>, Box<RawJsonValue>) { pub fn copy_redacts(&self) -> (Option<Arc<EventId>>, Box<RawJsonValue>) {
if self.kind == TimelineEventType::RoomRedaction { if self.kind == TimelineEventType::RoomRedaction {
if let Ok(mut content) = if let Ok(mut content) =

Loading…
Cancel
Save