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.
pull/21833/head
J. Ryan Stinnett 2019-04-30 09:22:41 +01:00
parent ad6be3cc1b
commit e71896420e
1 changed files with 6 additions and 17 deletions

View File

@ -24,7 +24,6 @@ import MatrixClientPeg from '../../../MatrixClientPeg';
import dis from '../../../dispatcher'; import dis from '../../../dispatcher';
import classNames from 'classnames'; import classNames from 'classnames';
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
import {getUserNameColorClass} from '../../../utils/FormattingUtils';
const MessageCase = Object.freeze({ const MessageCase = Object.freeze({
NotLoggedIn: "NotLoggedIn", 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() { _getMessageCase() {
const isGuest = MatrixClientPeg.get().isGuest(); const isGuest = MatrixClientPeg.get().isGuest();
@ -346,16 +339,12 @@ module.exports = React.createClass({
let inviterElement; let inviterElement;
if (inviteMember) { if (inviteMember) {
const MemberAvatar = sdk.getComponent("views.avatars.MemberAvatar"); const MemberAvatar = sdk.getComponent("views.avatars.MemberAvatar");
avatar = (<MemberAvatar member={inviteMember} onClick={this._onInviterClick} />); avatar = (<MemberAvatar member={inviteMember} />);
const inviterClasses = [ inviterElement = <span>
"mx_RoomPreviewBar_inviter", <span className="mx_RoomPreviewBar_inviter">
getUserNameColorClass(inviteMember.userId), {inviteMember.rawDisplayName}
].join(" "); </span> ({inviteMember.userId})
inviterElement = ( </span>;
<a onClick={this._onInviterClick} className={inviterClasses}>
{inviteMember.name}
</a>
);
} else { } else {
inviterElement = (<span className="mx_RoomPreviewBar_inviter">{this.props.inviterName}</span>); inviterElement = (<span className="mx_RoomPreviewBar_inviter">{this.props.inviterName}</span>);
} }