mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* 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
23 lines
643 B
Go
23 lines
643 B
Go
// 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"`
|
|
}
|