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
only call aggregation code for local echo for relations
This commit is contained in:
@@ -1106,19 +1106,21 @@ Room.prototype.addPendingEvent = function(event, txnId) {
|
|||||||
}
|
}
|
||||||
this._pendingEventList.push(event);
|
this._pendingEventList.push(event);
|
||||||
|
|
||||||
// For pending events, add them to the relations collection immediately.
|
if (event.isRelation()) {
|
||||||
// (The alternate case below already covers this as part of adding to
|
// For pending events, add them to the relations collection immediately.
|
||||||
// the timeline set.)
|
// (The alternate case below already covers this as part of adding to
|
||||||
// TODO: We should consider whether this means it would be a better
|
// the timeline set.)
|
||||||
// design to lift the relations handling up to the room instead.
|
// TODO: We should consider whether this means it would be a better
|
||||||
for (let i = 0; i < this._timelineSets.length; i++) {
|
// design to lift the relations handling up to the room instead.
|
||||||
const timelineSet = this._timelineSets[i];
|
for (let i = 0; i < this._timelineSets.length; i++) {
|
||||||
if (timelineSet.getFilter()) {
|
const timelineSet = this._timelineSets[i];
|
||||||
if (this._filter.filterRoomTimeline([event]).length) {
|
if (timelineSet.getFilter()) {
|
||||||
|
if (this._filter.filterRoomTimeline([event]).length) {
|
||||||
|
timelineSet.aggregateRelations(event);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
timelineSet.aggregateRelations(event);
|
timelineSet.aggregateRelations(event);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
timelineSet.aggregateRelations(event);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user