diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js
index 856d3ebad4..2f8bd30a72 100644
--- a/src/components/views/rooms/MemberInfo.js
+++ b/src/components/views/rooms/MemberInfo.js
@@ -625,22 +625,49 @@ module.exports = withMatrixClient(React.createClass({
},
_renderUserOptions: function() {
- // Only allow the user to ignore the user if its not ourselves
+ const cli = this.props.matrixClient;
+ const member = this.props.member;
+
let ignoreButton = null;
- if (this.props.member.userId !== this.props.matrixClient.getUserId()) {
+ let readReceiptButton = null;
+
+ // Only allow the user to ignore the user if its not ourselves
+ // same goes for jumping to read receipt
+ if (member.userId !== cli.getUserId()) {
ignoreButton = (
{ this.state.isIgnoring ? _t("Unignore") : _t("Ignore") }
);
+
+ if (member.roomId) {
+ const room = cli.getRoom(member.roomId);
+ const eventId = room.getEventReadUpTo(member.userId);
+
+ const onReadReceiptButton = function() {
+ dis.dispatch({
+ action: 'view_room',
+ highlighted: true,
+ event_id: eventId,
+ room_id: member.roomId,
+ });
+ };
+
+ readReceiptButton = (
+
+ { _t('Jump to read receipt') }
+
+ );
+ }
}
- if (!ignoreButton) return null;
+ if (!ignoreButton && !readReceiptButton) return null;
return (
{ _t("User Options") }
+ { readReceiptButton }
{ ignoreButton }
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 8998b379c2..16743e5ad0 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -252,6 +252,7 @@
"%(targetName)s joined the room.": "%(targetName)s joined the room.",
"Joins room with given alias": "Joins room with given alias",
"Jump to first unread message.": "Jump to first unread message.",
+ "Jump to read receipt": "Jump to read receipt",
"%(senderName)s kicked %(targetName)s.": "%(senderName)s kicked %(targetName)s.",
"Kick": "Kick",
"Kicks user with given id": "Kicks user with given id",