mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Refactored CreatePost to not use context (#3813)
This commit is contained in:
@@ -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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user