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
move CANCELLED check deeper into aggregation path
This commit is contained in:
@@ -20,6 +20,7 @@ limitations under the License.
|
|||||||
const EventEmitter = require("events").EventEmitter;
|
const EventEmitter = require("events").EventEmitter;
|
||||||
const utils = require("../utils");
|
const utils = require("../utils");
|
||||||
const EventTimeline = require("./event-timeline");
|
const EventTimeline = require("./event-timeline");
|
||||||
|
import {EventStatus} from "./event";
|
||||||
import logger from '../../src/logger';
|
import logger from '../../src/logger';
|
||||||
import Relations from './relations';
|
import Relations from './relations';
|
||||||
|
|
||||||
@@ -749,7 +750,7 @@ EventTimelineSet.prototype.aggregateRelations = function(event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.isRedacted()) {
|
if (event.isRedacted() || event.status === EventStatus.CANCELLED) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1356,10 +1356,7 @@ Room.prototype._revertRedactionLocalEcho = function(redactionEvent) {
|
|||||||
// re-render after undoing redaction
|
// re-render after undoing redaction
|
||||||
this.emit("Room.redactionCancelled", redactionEvent, this);
|
this.emit("Room.redactionCancelled", redactionEvent, this);
|
||||||
// reapply relation now redaction failed
|
// reapply relation now redaction failed
|
||||||
if (
|
if (redactedEvent.isRelation()) {
|
||||||
redactedEvent.isRelation() &&
|
|
||||||
redactedEvent.status !== EventStatus.CANCELLED
|
|
||||||
) {
|
|
||||||
this._aggregateNonLiveRelation(redactedEvent);
|
this._aggregateNonLiveRelation(redactedEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user