mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
Hide 'Email: ' is the first char is @
This commit is contained in:
parent
c3f786cc5e
commit
e78c1fba87
1 changed files with 11 additions and 4 deletions
|
@ -312,11 +312,18 @@ module.exports = React.createClass({
|
|||
|
||||
onSearchQueryChanged: function(input) {
|
||||
var EntityTile = sdk.getComponent("rooms.EntityTile");
|
||||
|
||||
var label;
|
||||
if (input[0] === "@") {
|
||||
label = input;
|
||||
}
|
||||
else {
|
||||
label = "Email: " + input;
|
||||
}
|
||||
|
||||
this._emailEntity = new Entities.newEntity(
|
||||
<EntityTile key="inv_email" suppressOnHover={true} showInviteButton={true}
|
||||
presenceState="online" onClick={this.onInvite.bind(this, input)} name={
|
||||
`Email: ${input}`
|
||||
} />,
|
||||
<EntityTile key="dynamic_invite_tile" suppressOnHover={true} showInviteButton={true}
|
||||
presenceState="online" onClick={this.onInvite.bind(this, input)} name={label} />,
|
||||
function(query) {
|
||||
return true; // always show this
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue