From a755bcdde63b2f27866d49be97bb82e4cdb0e893 Mon Sep 17 00:00:00 2001 From: Charles Birk Date: Mon, 17 Sep 2018 10:15:28 -0400 Subject: [MM-11860]: Expose slack attachment parsing functions in the model package (#9351) Refactored parseSlackAttachment functions from https://github.com/mattermost/mattermost-server/blob/master/app/post.go#L312 into model/slack_attachments.go so that plugins have access to them. --- app/command.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/command.go') diff --git a/app/command.go b/app/command.go index a1902bd10..8f824982d 100644 --- a/app/command.go +++ b/app/command.go @@ -38,7 +38,7 @@ func GetCommandProvider(name string) CommandProvider { } func (a *App) CreateCommandPost(post *model.Post, teamId string, response *model.CommandResponse) (*model.Post, *model.AppError) { - post.Message = parseSlackLinksToMarkdown(response.Text) + post.Message = model.ParseSlackLinksToMarkdown(response.Text) post.CreateAt = model.GetMillis() if strings.HasPrefix(post.Type, model.POST_SYSTEM_MESSAGE_PREFIX) { @@ -47,7 +47,7 @@ func (a *App) CreateCommandPost(post *model.Post, teamId string, response *model } if response.Attachments != nil { - parseSlackAttachment(post, response.Attachments) + model.ParseSlackAttachment(post, response.Attachments) } if response.ResponseType == model.COMMAND_RESPONSE_TYPE_IN_CHANNEL { -- cgit v1.2.3-1-g7c22