summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_post.jsx
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2017-07-31 18:54:34 +0200
committerHarrison Healey <harrisonmhealey@gmail.com>2017-07-31 12:54:34 -0400
commit251f000c68ed384923d3b2bc6b3caea9aef2a089 (patch)
treec8740dcf79f1f837529f2a436f1ed377c771ae43 /webapp/components/create_post.jsx
parent489602efe5e099f57bb2b58b7c67f8fc104ff5db (diff)
downloadchat-251f000c68ed384923d3b2bc6b3caea9aef2a089.tar.gz
chat-251f000c68ed384923d3b2bc6b3caea9aef2a089.tar.bz2
chat-251f000c68ed384923d3b2bc6b3caea9aef2a089.zip
[PLT-6710] /rename [text] slash command: Rename the channel (#6570)
* /rename [text] slash command: Rename the channel * update strings per review
Diffstat (limited to 'webapp/components/create_post.jsx')
-rw-r--r--webapp/components/create_post.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx
index 328f182a3..e5ead4e84 100644
--- a/webapp/components/create_post.jsx
+++ b/webapp/components/create_post.jsx
@@ -243,6 +243,12 @@ export default class CreatePost extends React.Component {
return;
}
+ if (!isDirectOrGroup && this.state.message.trimRight() === '/rename') {
+ GlobalActions.showChannelNameUpdateModal(updateChannel);
+ this.setState({message: ''});
+ return;
+ }
+
this.doSubmit(e);
}