diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2017-06-29 16:39:13 +0200 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-06-29 10:39:13 -0400 |
commit | e1168ab7cc9770ab71fda6994ee80ef0e64e15d7 (patch) | |
tree | feec158a3994b86387a408776a3e55cd9eb949d4 /webapp/components | |
parent | 50b662040c5c2e2544b3517dc766f1837c7f05e1 (diff) | |
download | chat-e1168ab7cc9770ab71fda6994ee80ef0e64e15d7.tar.gz chat-e1168ab7cc9770ab71fda6994ee80ef0e64e15d7.tar.bz2 chat-e1168ab7cc9770ab71fda6994ee80ef0e64e15d7.zip |
[PLT-6847] If a message starts with a / but is not a slash command, put the text back in the input box when it fails to send (#6695)
* If a message starts with a / but is not a slash command, put the text back in the input box when it fails to send
* update string per review
* update per review
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/create_post.jsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index 4587f3a90..e7fafc514 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -170,10 +170,11 @@ export default class CreatePost extends React.Component { if (err.sendMessage) { this.sendMessage(post); } else { - const state = {}; - state.serverError = err.message; - state.submitting = false; - this.setState({state}); + this.setState({ + serverError: err.message, + submitting: false, + message: post.message + }); } } ); |