From 6e3245a3b0a252fd278a4af92e0a0fea818fc29a Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 18 Jan 2016 01:26:15 +0000 Subject: [PATCH] make linkify userid jump to memberinfo --- src/components/structures/MatrixChat.js | 10 ++++++++++ src/components/views/rooms/MemberInfo.js | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index e5af2a86b5..23be8d6587 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -636,6 +636,8 @@ module.exports = React.createClass({ onUserClick: function(event, userId) { event.preventDefault(); + + /* var MemberInfo = sdk.getComponent('rooms.MemberInfo'); var member = new Matrix.RoomMember(null, userId); ContextualMenu.createMenu(MemberInfo, { @@ -643,6 +645,14 @@ module.exports = React.createClass({ right: window.innerWidth - event.pageX, top: event.pageY }); + */ + + var member = new Matrix.RoomMember(null, userId); + if (!member) { return; } + dis.dispatch({ + action: 'view_user', + member: member, + }); }, onLogoutClick: function(event) { diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index c08ba38ab0..d78fc5a005 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -383,6 +383,9 @@ module.exports = React.createClass({ } + // TODO: we should have an invite button if this MemberInfo is showing a user who isn't actually in the current room yet + // e.g. clicking on a linkified userid in a room + var adminTools; if (kickButton || banButton || muteButton || giveModButton) { adminTools =