From f411d50253ff344080641c2de0a750f389e22190 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 13 May 2019 14:17:23 +0100 Subject: [PATCH] Clarify before redaction event timing --- src/models/relations.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/models/relations.js b/src/models/relations.js index 78bb74952f0..240e3634074 100644 --- a/src/models/relations.js +++ b/src/models/relations.js @@ -124,8 +124,12 @@ export default class Relations extends EventEmitter { } /** - * For relations that are about to be redacted, remove them from aggregation - * data sets and emit an update event. + * For relations that have been redacted, we want to remove them from + * aggregation data sets and emit an update event. + * + * To do so, we listen for `Room.beforeRedaction`, which happens: + * - after the server accepted the redaction and remote echoed back to us + * - before the original event has been marked redacted in the client * * @param {MatrixEvent} redactedEvent * The original relation event that is about to be redacted.