Merge commit '71e2495' into rav/roomview_works

Conflicts:
	src/components/structures/RoomView.js
This commit is contained in:
Richard van der Hoff 2016-02-23 13:24:38 +00:00
commit 9eff426819
2 changed files with 19 additions and 3 deletions

View file

@ -213,7 +213,7 @@ module.exports = React.createClass({
sendReadReceipt: function() {
if (!this.refs.messagePanel) return;
var currentReadUpToEventId = this._getCurrentReadReceipt();
var currentReadUpToEventId = this._getCurrentReadReceipt(true);
var currentReadUpToEventIndex = this._indexForEventId(currentReadUpToEventId);
// We want to avoid sending out read receipts when we are looking at
@ -396,15 +396,20 @@ module.exports = React.createClass({
/**
* get the id of the event corresponding to our user's latest read-receipt.
*
* @param {Boolean} ignoreSynthesized If true, return only receipts that
* have been sent by the server, not
* implicit ones generated by the JS
* SDK.
*/
_getCurrentReadReceipt: function() {
_getCurrentReadReceipt: function(ignoreSynthesized) {
var client = MatrixClientPeg.get();
// the client can be null on logout
if (client == null)
return null;
var myUserId = client.credentials.userId;
return this.props.room.getEventReadUpTo(myUserId);
return this.props.room.getEventReadUpTo(myUserId, ignoreSynthesized);
},

View file

@ -114,6 +114,17 @@ matrixLinkify.options = {
}
};
}
},
formatHref: function (href, type) {
switch (type) {
case 'roomalias':
return '#/room/' + href;
case 'userid':
return '#';
default:
return href;
}
}
};