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
Remove cancelled relations from the relations collection
This listens for event status changes on sending events in case they might be cancelled and removes them from aggregation if so. Part of https://github.com/vector-im/riot-web/issues/9731
This commit is contained in:
@@ -1130,7 +1130,7 @@ Room.prototype.addPendingEvent = function(event, txnId) {
|
||||
if (this._opts.pendingEventOrdering == "detached") {
|
||||
if (this._pendingEventList.some((e) => e.status === EventStatus.NOT_SENT)) {
|
||||
console.warn("Setting event as NOT_SENT due to messages in the same state");
|
||||
event.status = EventStatus.NOT_SENT;
|
||||
event.setStatus(EventStatus.NOT_SENT);
|
||||
}
|
||||
this._pendingEventList.push(event);
|
||||
|
||||
@@ -1287,7 +1287,7 @@ Room.prototype.updatePendingEvent = function(event, newStatus, newEventId) {
|
||||
newStatus);
|
||||
}
|
||||
|
||||
event.status = newStatus;
|
||||
event.setStatus(newStatus);
|
||||
|
||||
if (newStatus == EventStatus.SENT) {
|
||||
// update the event id
|
||||
|
||||
Reference in New Issue
Block a user