You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
click on nicks to insert them into the MessageComposer
This commit is contained in:
@@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user