1
0
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:
Bruno Windels
2019-05-16 14:42:09 +01:00
parent 261ab7ae68
commit e23ba50dd8

View File

@@ -1106,6 +1106,7 @@ Room.prototype.addPendingEvent = function(event, txnId) {
} }
this._pendingEventList.push(event); this._pendingEventList.push(event);
if (event.isRelation()) {
// For pending events, add them to the relations collection immediately. // For pending events, add them to the relations collection immediately.
// (The alternate case below already covers this as part of adding to // (The alternate case below already covers this as part of adding to
// the timeline set.) // the timeline set.)
@@ -1121,6 +1122,7 @@ Room.prototype.addPendingEvent = function(event, txnId) {
timelineSet.aggregateRelations(event); timelineSet.aggregateRelations(event);
} }
} }
}
} else { } else {
for (let i = 0; i < this._timelineSets.length; i++) { for (let i = 0; i < this._timelineSets.length; i++) {
const timelineSet = this._timelineSets[i]; const timelineSet = this._timelineSets[i];