From 7e67aa2e23e69bc76e5d3130862e5891cd0feca6 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 25 Sep 2021 12:44:04 -0600 Subject: [PATCH] Clarify how redacted_because actually works for events (#3411) * Clarify how redacted_because actually works for events * changelog * mention federation * Fix wording Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- .../client_server/newsfragments/3411.clarification | 1 + content/client-server-api/_index.md | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 changelogs/client_server/newsfragments/3411.clarification diff --git a/changelogs/client_server/newsfragments/3411.clarification b/changelogs/client_server/newsfragments/3411.clarification new file mode 100644 index 00000000..47133db8 --- /dev/null +++ b/changelogs/client_server/newsfragments/3411.clarification @@ -0,0 +1 @@ +Clarify how `redacted_because` is meant to work. diff --git a/content/client-server-api/_index.md b/content/client-server-api/_index.md index 1f50ae7a..f868509b 100644 --- a/content/client-server-api/_index.md +++ b/content/client-server-api/_index.md @@ -1593,17 +1593,15 @@ some events cannot be simply deleted, e.g. membership events, we instead not required by the protocol. This stripped down event is thereafter returned anytime a client or remote server requests it. Redacting an event cannot be undone, allowing server owners to delete the offending -content from the databases. Events that have been redacted include a -`redacted_because` key whose value is the event that caused it to be -redacted, which may include a reason. +content from the databases. Servers should include a copy of the +`m.room.redaction` event under `unsigned` as `redacted_because` +when serving the redacted event to clients. The exact algorithm to apply against an event is defined in the [room version specification](../index.html#room-versions). -The server should add the event causing the redaction to the `unsigned` -property of the redacted event, under the `redacted_because` key. When a -client receives a redaction event it should change the redacted event in -the same way a server does. +When a client receives an `m.room.redaction` event, it should change +the affected event in the same way a server does. {{% boxes/note %}} Redacted events can still affect the state of the room. When redacted,