mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[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
This commit is contained in:
committed by
Harrison Healey
parent
50b662040c
commit
e1168ab7cc
@@ -429,7 +429,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.command.execute_command.not_found.app_error",
|
||||
"translation": "Command with a trigger of '{{.Trigger}}' not found"
|
||||
"translation": "Command with a trigger of '{{.Trigger}}' not found. To send a message beginning with \"/\", try adding an empty space at the beginning of the message."
|
||||
},
|
||||
{
|
||||
"id": "api.command.execute_command.save.app_error",
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user