summaryrefslogtreecommitdiffstats
path: root/api/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/command.go')
-rw-r--r--api/command.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/command.go b/api/command.go
index 1e58308ad..45355f092 100644
--- a/api/command.go
+++ b/api/command.go
@@ -247,7 +247,8 @@ func handleResponse(c *Context, w http.ResponseWriter, response *model.CommandRe
if response.ResponseType == model.COMMAND_RESPONSE_TYPE_IN_CHANNEL {
post.Message = response.Text
- if _, err := CreatePost(c, post, true); err != nil {
+ post.UserId = c.Session.UserId
+ if _, err := CreatePost(c.TeamId, post, true); err != nil {
c.Err = model.NewLocAppError("command", "api.command.execute_command.save.app_error", nil, "")
}
} else if response.ResponseType == model.COMMAND_RESPONSE_TYPE_EPHEMERAL && response.Text != "" {