You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-05 17:02:07 +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:
@@ -1011,7 +1011,6 @@ Room.prototype._addLiveEvent = function(event, duplicateStrategy) {
|
||||
// if we know about this event, redact its contents now.
|
||||
const redactedEvent = this.getUnfilteredTimelineSet().findEventById(redactId);
|
||||
if (redactedEvent) {
|
||||
this.emit("Room.beforeRedaction", redactedEvent, event, this);
|
||||
redactedEvent.makeRedacted(event);
|
||||
this.emit("Room.redaction", event, this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user