[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.
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
7226ea7dfb
Коммит
a755bcdde6
@@ -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)
|
||||
|
||||
Ссылка в новой задаче
Block a user