PLT-7818 Updates to post type (#7579)
* Updates to post type * Update tests
Этот коммит содержится в:
коммит произвёл
Chris
родитель
0da0cf1a21
Коммит
9adaf53e11
@@ -41,6 +41,11 @@ func (a *App) CreateCommandPost(post *model.Post, teamId string, response *model
|
||||
post.Message = parseSlackLinksToMarkdown(response.Text)
|
||||
post.CreateAt = model.GetMillis()
|
||||
|
||||
if strings.HasPrefix(post.Type, model.POST_SYSTEM_MESSAGE_PREFIX) {
|
||||
err := model.NewAppError("CreateCommandPost", "api.context.invalid_param.app_error", map[string]interface{}{"Name": "post.type"}, "", http.StatusBadRequest)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if response.Attachments != nil {
|
||||
parseSlackAttachment(post, response.Attachments)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user