click on nicks to insert them into the MessageComposer
This commit is contained in:
parent
a13513935b
commit
c7ffb59374
2 changed files with 20 additions and 4 deletions
|
@ -196,6 +196,15 @@ module.exports = React.createClass({
|
|||
case 'focus_composer':
|
||||
this.refs.textarea.focus();
|
||||
break;
|
||||
case 'insert_displayname':
|
||||
if (this.refs.textarea.value) {
|
||||
this.refs.textarea.value =
|
||||
this.refs.textarea.value.replace(/( ?)$/, " " + payload.displayname);
|
||||
}
|
||||
else {
|
||||
this.refs.textarea.value = payload.displayname + ": ";
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue