You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-10 07:22:27 +03:00
Change to event-level beforeRedaction event for efficiency
To avoid an O(n^2) situation with every relations container trying to process every redaction that may occur in a room, this switches to an event-level notification, so that the specific relations container who cares can listen to just the events it wants to know about.
This commit is contained in:
@@ -661,6 +661,8 @@ utils.extend(module.exports.MatrixEvent.prototype, {
|
||||
throw new Error("invalid redaction_event in makeRedacted");
|
||||
}
|
||||
|
||||
this.emit("Event.beforeRedaction", this, redaction_event);
|
||||
|
||||
// we attempt to replicate what we would see from the server if
|
||||
// the event had been redacted before we saw it.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user