mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 17:56:01 +03:00
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.
This commit is contained in:
parent
ad6be3cc1b
commit
e71896420e
1 changed files with 6 additions and 17 deletions
|
@ -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 = (<MemberAvatar member={inviteMember} onClick={this._onInviterClick} />);
|
||||
const inviterClasses = [
|
||||
"mx_RoomPreviewBar_inviter",
|
||||
getUserNameColorClass(inviteMember.userId),
|
||||
].join(" ");
|
||||
inviterElement = (
|
||||
<a onClick={this._onInviterClick} className={inviterClasses}>
|
||||
{inviteMember.name}
|
||||
</a>
|
||||
);
|
||||
avatar = (<MemberAvatar member={inviteMember} />);
|
||||
inviterElement = <span>
|
||||
<span className="mx_RoomPreviewBar_inviter">
|
||||
{inviteMember.rawDisplayName}
|
||||
</span> ({inviteMember.userId})
|
||||
</span>;
|
||||
} else {
|
||||
inviterElement = (<span className="mx_RoomPreviewBar_inviter">{this.props.inviterName}</span>);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue