From 1271908182718b4c2a47e896e3b42c392296b3ce Mon Sep 17 00:00:00 2001 From: Yusuke Nemoto Date: Thu, 22 Nov 2018 11:10:59 +0900 Subject: [PATCH] Block to override post_type if already set (#9859) --- model/slack_attachment.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/model/slack_attachment.go b/model/slack_attachment.go index 827bf35b39..273def8767 100644 --- a/model/slack_attachment.go +++ b/model/slack_attachment.go @@ -64,7 +64,9 @@ func StringifySlackFieldValue(a []*SlackAttachment) []*SlackAttachment { // This method only parses and processes the attachments, // all else should be set in the post which is passed func ParseSlackAttachment(post *Post, attachments []*SlackAttachment) { - post.Type = POST_SLACK_ATTACHMENT + if post.Type == "" { + post.Type = POST_SLACK_ATTACHMENT + } for _, attachment := range attachments { attachment.Text = ParseSlackLinksToMarkdown(attachment.Text)