Block to override post_type if already set (#9859)

This commit is contained in:
Yusuke Nemoto
2018-11-21 21:10:59 -05:00
committed by Jesse Hallam
parent cae7798d76
commit 1271908182
+3 -1
View File
@@ -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)