MM-13932 Fix image metadata for invalid image links (#10217)

Этот коммит содержится в:
Harrison Healey
2019-02-01 17:23:04 -05:00
коммит произвёл Carlos Tadeu Panato Junior
родитель a2f46c0466
Коммит 46b05499cc
2 изменённых файлов: 56 добавлений и 1 удалений

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

@@ -192,7 +192,7 @@ func (a *App) getImagesForPost(post *model.Post, imageURLs []string, isNewPost b
if _, image, err := a.getLinkMetadata(imageURL, post.CreateAt, isNewPost); err != nil {
mlog.Warn("Failed to get dimensions of an image in a post",
mlog.String("post_id", post.Id), mlog.String("image_url", imageURL), mlog.Any("err", err))
} else {
} else if image != nil {
images[imageURL] = image
}
}