From e71896420eae0d7e4874d996acc3b88f26843782 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 30 Apr 2019 09:22:41 +0100 Subject: [PATCH] Show only a static inviter name with full MXID This removes the clickable inviter behaviour, as it was too confusing to reveal the user info sidebar and also hide the invite. Keeping both on screen would be okay, but seems a bit too complex to resolve right before RC. In addition, this adds the full inviter MXID to ensure it's clear who invited you. --- src/components/views/rooms/RoomPreviewBar.js | 23 +++++--------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/components/views/rooms/RoomPreviewBar.js b/src/components/views/rooms/RoomPreviewBar.js index 02a93ebcc0..8426007e2f 100644 --- a/src/components/views/rooms/RoomPreviewBar.js +++ b/src/components/views/rooms/RoomPreviewBar.js @@ -24,7 +24,6 @@ import MatrixClientPeg from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; import classNames from 'classnames'; import { _t } from '../../../languageHandler'; -import {getUserNameColorClass} from '../../../utils/FormattingUtils'; const MessageCase = Object.freeze({ NotLoggedIn: "NotLoggedIn", @@ -105,12 +104,6 @@ module.exports = React.createClass({ } }, - _onInviterClick(evt) { - evt.preventDefault(); - const member = this._getInviteMember(); - dis.dispatch({action: 'view_user_info', userId: member.userId}); - }, - _getMessageCase() { const isGuest = MatrixClientPeg.get().isGuest(); @@ -346,16 +339,12 @@ module.exports = React.createClass({ let inviterElement; if (inviteMember) { const MemberAvatar = sdk.getComponent("views.avatars.MemberAvatar"); - avatar = (); - const inviterClasses = [ - "mx_RoomPreviewBar_inviter", - getUserNameColorClass(inviteMember.userId), - ].join(" "); - inviterElement = ( - - {inviteMember.name} - - ); + avatar = (); + inviterElement = + + {inviteMember.rawDisplayName} + ({inviteMember.userId}) + ; } else { inviterElement = ({this.props.inviterName}); }