summaryrefslogtreecommitdiffstats
path: root/api/command.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-22 21:32:39 -0500
committerCorey Hulen <corey@hulen.com>2017-02-22 21:32:39 -0500
commit9f65284ba1c67c20de1ccd7a5af80aa64c3575f7 (patch)
tree2fec884914f72797e79af8bf376620f1add3ffdc /api/command.go
parentad61a63ad227b9cef68946f6c679b6cd49a01a37 (diff)
downloadchat-9f65284ba1c67c20de1ccd7a5af80aa64c3575f7.tar.gz
chat-9f65284ba1c67c20de1ccd7a5af80aa64c3575f7.tar.bz2
chat-9f65284ba1c67c20de1ccd7a5af80aa64c3575f7.zip
Fix response for malformed command execute request (#5498)
Diffstat (limited to 'api/command.go')
-rw-r--r--api/command.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/command.go b/api/command.go
index 7e0a1e232..c3a64702f 100644
--- a/api/command.go
+++ b/api/command.go
@@ -219,6 +219,10 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) {
}
func handleResponse(c *Context, w http.ResponseWriter, response *model.CommandResponse, commandArgs *model.CommandArgs, cmd *model.Command, builtIn bool) {
+ if c.Err != nil {
+ return
+ }
+
post := &model.Post{}
post.ChannelId = commandArgs.ChannelId
post.RootId = commandArgs.RootId