From 2d8c551cd5f23c8ab7ab24b0bdde9dd413a5fa20 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 17 Apr 2024 19:41:38 +0200 Subject: [PATCH] Fix doc --- src/service/pdu.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/service/pdu.rs b/src/service/pdu.rs index b5c95981..a51d7ec5 100644 --- a/src/service/pdu.rs +++ b/src/service/pdu.rs @@ -97,7 +97,7 @@ impl PduEvent { 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 /// [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 /// > property to the top level of m.room.redaction events in when serving such events /// > 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>, Box) { if self.kind == TimelineEventType::RoomRedaction { if let Ok(mut content) =