diff options
author | Charles Birk <charles@cryptolab.net> | 2018-09-17 10:15:28 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2018-09-17 10:15:28 -0400 |
commit | a755bcdde63b2f27866d49be97bb82e4cdb0e893 (patch) | |
tree | 96d89780b184a17da7b66acd1049a5c40b919301 /app/webhook.go | |
parent | 7226ea7dfbf21860a5eb2fe0997a8363df4a4dd6 (diff) | |
download | chat-a755bcdde63b2f27866d49be97bb82e4cdb0e893.tar.gz chat-a755bcdde63b2f27866d49be97bb82e4cdb0e893.tar.bz2 chat-a755bcdde63b2f27866d49be97bb82e4cdb0e893.zip |
[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.
Diffstat (limited to 'app/webhook.go')
-rw-r--r-- | app/webhook.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/webhook.go b/app/webhook.go index f0264c0c6..2557a99e6 100644 --- a/app/webhook.go +++ b/app/webhook.go @@ -265,7 +265,7 @@ func (a *App) CreateWebhookPost(userId string, channel *model.Channel, text, ove for key, val := range props { if key == "attachments" { if attachments, success := val.([]*model.SlackAttachment); success { - parseSlackAttachment(post, attachments) + model.ParseSlackAttachment(post, attachments) } } else if key != "override_icon_url" && key != "override_username" && key != "from_webhook" { post.AddProp(key, val) |