Refactored CreatePost to not use context (#3813)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
9ad50d4d75
Коммит
8c2ea22892
@@ -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)
|
||||
}
|
||||
}()
|
||||
|
||||
Ссылка в новой задаче
Block a user