For mentions, always use rawDisplayName and remove (IRC)

This commit is contained in:
Luke Barnard 2017-08-09 10:40:06 +01:00
parent 102b02054b
commit 610b2a3a42
2 changed files with 3 additions and 2 deletions

View file

@ -269,7 +269,8 @@ export default class MessageComposerInput extends React.Component {
// paths for inserting a user pill is not fun
const selection = this.state.editorState.getSelection();
const member = this.props.room.getMember(payload.user_id);
const completion = member ? member.name.replace(' (IRC)', '') : payload.user_id;
const completion = member ?
member.rawDisplayName.replace(' (IRC)', '') : payload.user_id;
this.setDisplayedCompletion({
completion,
selection,