mirror of https://github.com/vector-im/riot-web
Merge commit '71e2495' into rav/roomview_works
Conflicts: src/components/structures/RoomView.jspull/21833/head
commit
9eff426819
|
@ -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);
|
||||
},
|
||||
|
||||
|
||||
|
|
|
@ -114,6 +114,17 @@ matrixLinkify.options = {
|
|||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
formatHref: function (href, type) {
|
||||
switch (type) {
|
||||
case 'roomalias':
|
||||
return '#/room/' + href;
|
||||
case 'userid':
|
||||
return '#';
|
||||
default:
|
||||
return href;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue