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
first look in pending event list for event being redacted
in case the redacted event hasn't been sent yet
This commit is contained in:
@@ -1143,7 +1143,10 @@ Room.prototype.addPendingEvent = function(event, txnId) {
|
||||
|
||||
if (event.getType() === "m.room.redaction") {
|
||||
const redactId = event.event.redacts;
|
||||
const redactedEvent = this.getUnfilteredTimelineSet().findEventById(redactId);
|
||||
let redactedEvent = this._pendingEventList && this._pendingEventList.find(e => e.getId() === redactId);
|
||||
if (!redactedEvent) {
|
||||
redactedEvent = this.getUnfilteredTimelineSet().findEventById(redactId);
|
||||
}
|
||||
if (redactedEvent) {
|
||||
redactedEvent.markLocallyRedacted(event);
|
||||
this.emit("Room.redaction", event, this);
|
||||
|
||||
Reference in New Issue
Block a user