diff options
author | David Lu <david.lu97@outlook.com> | 2016-08-19 08:08:31 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-08-19 08:08:31 -0400 |
commit | 8c2ea22892079cb7f72be96ae6ddff165cda6e43 (patch) | |
tree | 8b7cc90ec3ca8d3cdb2437dcf726174e74a9903e /api/command_echo.go | |
parent | 9ad50d4d7562c1b029c888e892dd7cfc203f938a (diff) | |
download | chat-8c2ea22892079cb7f72be96ae6ddff165cda6e43.tar.gz chat-8c2ea22892079cb7f72be96ae6ddff165cda6e43.tar.bz2 chat-8c2ea22892079cb7f72be96ae6ddff165cda6e43.zip |
Refactored CreatePost to not use context (#3813)
Diffstat (limited to 'api/command_echo.go')
-rw-r--r-- | api/command_echo.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/api/command_echo.go b/api/command_echo.go index 805db7ad2..5caa41759 100644 --- a/api/command_echo.go +++ b/api/command_echo.go @@ -77,10 +77,11 @@ func (me *EchoProvider) DoCommand(c *Context, channelId string, message string) post := &model.Post{} post.ChannelId = channelId post.Message = message + post.UserId = c.Session.UserId time.Sleep(time.Duration(delay) * time.Second) - if _, err := CreatePost(c, post, true); err != nil { + if _, err := CreatePost(c.TeamId, post, true); err != nil { l4g.Error(c.T("api.command_echo.create.app_error"), err) } }() |