From f7de8d4f5862f186d9a443f15b966b5a68359e66 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 16 May 2019 14:43:32 +0100 Subject: [PATCH 1/3] use new events to find out about replacements --- src/components/structures/TimelinePanel.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 3e79ea7f18..7c1afbe9c3 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -204,11 +204,11 @@ const TimelinePanel = React.createClass({ MatrixClientPeg.get().on("Room.timeline", this.onRoomTimeline); MatrixClientPeg.get().on("Room.timelineReset", this.onRoomTimelineReset); MatrixClientPeg.get().on("Room.redaction", this.onRoomRedaction); - MatrixClientPeg.get().on("Room.replaceEvent", this.onRoomReplaceEvent); MatrixClientPeg.get().on("Room.receipt", this.onRoomReceipt); MatrixClientPeg.get().on("Room.localEchoUpdated", this.onLocalEchoUpdated); MatrixClientPeg.get().on("Room.accountData", this.onAccountData); MatrixClientPeg.get().on("Event.decrypted", this.onEventDecrypted); + MatrixClientPeg.get().on("Event.replaced", this.onEventReplaced); MatrixClientPeg.get().on("sync", this.onSync); this._initTimeline(this.props); @@ -283,11 +283,11 @@ const TimelinePanel = React.createClass({ client.removeListener("Room.timeline", this.onRoomTimeline); client.removeListener("Room.timelineReset", this.onRoomTimelineReset); client.removeListener("Room.redaction", this.onRoomRedaction); - client.removeListener("Room.replaceEvent", this.onRoomReplaceEvent); client.removeListener("Room.receipt", this.onRoomReceipt); client.removeListener("Room.localEchoUpdated", this.onLocalEchoUpdated); client.removeListener("Room.accountData", this.onAccountData); client.removeListener("Event.decrypted", this.onEventDecrypted); + client.removeListener("Event.replaced", this.onEventReplaced); client.removeListener("sync", this.onSync); } }, @@ -507,7 +507,7 @@ const TimelinePanel = React.createClass({ this.forceUpdate(); }, - onRoomReplaceEvent: function(replacedEvent, room) { + onEventReplaced: function(replacedEvent, room) { if (this.unmounted) return; // ignore events for other rooms From 31817a91c6600ec53093b3e4212eeeae49225cbb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 16 May 2019 14:43:47 +0100 Subject: [PATCH 2/3] remove replacements flag --- src/MatrixClientPeg.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 82bd273846..391d089cc6 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -188,8 +188,7 @@ class MatrixClientPeg { timelineSupport: true, forceTURN: !SettingsStore.getValue('webRtcAllowPeerToPeer', false), verificationMethods: [verificationMethods.SAS], - unstableClientRelationAggregation: aggregateRelations, - unstableClientRelationReplacements: enableEdits, + unstableClientRelationAggregation: aggregateRelations || enableEdits, }; this.matrixClient = createMatrixClient(opts); From 3ef631191be8b5613e2a68b78d2a84afb7e4964b Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 16 May 2019 14:44:00 +0100 Subject: [PATCH 3/3] show sending status for replacements as well on local echo --- src/components/structures/MessagePanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 6f21bb6951..dbaab57adf 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -532,7 +532,7 @@ module.exports = React.createClass({ readReceiptMap={this._readReceiptMap} showUrlPreview={this.props.showUrlPreview} checkUnmounting={this._isUnmounting} - eventSendStatus={mxEv.status} + eventSendStatus={mxEv.replacementOrOwnStatus()} tileShape={this.props.tileShape} isTwelveHour={this.props.isTwelveHour} permalinkCreator={this.props.permalinkCreator}