[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
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
50b662040c
Коммит
e1168ab7cc
@@ -429,7 +429,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "api.command.execute_command.not_found.app_error",
|
"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",
|
"id": "api.command.execute_command.save.app_error",
|
||||||
|
|||||||
@@ -170,10 +170,11 @@ export default class CreatePost extends React.Component {
|
|||||||
if (err.sendMessage) {
|
if (err.sendMessage) {
|
||||||
this.sendMessage(post);
|
this.sendMessage(post);
|
||||||
} else {
|
} else {
|
||||||
const state = {};
|
this.setState({
|
||||||
state.serverError = err.message;
|
serverError: err.message,
|
||||||
state.submitting = false;
|
submitting: false,
|
||||||
this.setState({state});
|
message: post.message
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user