Block to override post_type if already set (#9859)

Этот коммит содержится в:
Yusuke Nemoto
2018-11-22 11:10:59 +09:00
коммит произвёл Jesse Hallam
родитель cae7798d76
Коммит 1271908182

Просмотреть файл

@@ -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)