make linkify userid jump to memberinfo

This commit is contained in:
Matthew Hodgson 2016-01-18 01:26:15 +00:00
parent 8e1ab8e6b4
commit 6e3245a3b0
2 changed files with 13 additions and 0 deletions

View file

@ -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) {

View file

@ -383,6 +383,9 @@ module.exports = React.createClass({
</div>
}
// 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 =