From aef04d682ba2da7abfb5cefd6e48c7ce5c88beb9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 18 Feb 2016 18:16:39 +0000 Subject: [PATCH 1/2] Make the links we emit for room URLs valid rather than relying on the onClick handler (ie. make them work if you c+p them) --- src/linkify-matrix.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/linkify-matrix.js b/src/linkify-matrix.js index abb51e85d8..7fb043f800 100644 --- a/src/linkify-matrix.js +++ b/src/linkify-matrix.js @@ -114,6 +114,17 @@ matrixLinkify.options = { } }; } + }, + + formatHref: function (href, type) { + switch (type) { + case 'roomalias': + return '#/room/' + href; + case 'userid': + return '#'; + default: + return href; + } } }; From 71e2495e817c086aab60846679284f37fc7f9346 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 19 Feb 2016 14:45:02 +0000 Subject: [PATCH 2/2] Use new flag in js-sdk to look at the last read receipt the server actually has and ignore implicit ones, otherwise we can end up not sending an RR because we think there's already a more recent one, even though that one is implicit. --- src/components/structures/RoomView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 61e8710c0d..38a6abb5cf 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1111,7 +1111,7 @@ module.exports = React.createClass({ // the bottom of the room again, or something. if (!this.state.atEndOfLiveTimeline) return; - var currentReadUpToEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId); + var currentReadUpToEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId, true); var currentReadUpToEventIndex = this._indexForEventId(currentReadUpToEventId); // We want to avoid sending out read receipts when we are looking at