MM-11868/MM-12010/MM-12011/MM-12036 Improve post metadata structure (#9693)
* MM-11868/MM-12010/MM-12011/MM-12036 Include dimensions for opengraph and message attachment images in post metadata * Remove duplicate check from getFirstLinkAndImages * Add tests for getImagesInMessageAttachments * Rename PostMetadata.FileInfos to PostMetadata.Files * Rename Metadata.ImageDimensions to Metadata.Images
Этот коммит содержится в:
22
model/post_embed.go
Обычный файл
22
model/post_embed.go
Обычный файл
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
package model
|
||||
|
||||
const (
|
||||
POST_EMBED_IMAGE PostEmbedType = "image"
|
||||
POST_EMBED_MESSAGE_ATTACHMENT PostEmbedType = "message_attachment"
|
||||
POST_EMBED_OPENGRAPH PostEmbedType = "opengraph"
|
||||
)
|
||||
|
||||
type PostEmbedType string
|
||||
|
||||
type PostEmbed struct {
|
||||
Type PostEmbedType `json:"type"`
|
||||
|
||||
// The URL of the embedded content. Used for image and OpenGraph embeds.
|
||||
URL string `json:"url,omitempty"`
|
||||
|
||||
// Any additional data for the embedded content. Only used for OpenGraph embeds.
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
}
|
||||
Ссылка в новой задаче
Block a user