1
0
mirror of synced 2025-02-16 21:43:13 +03:00

Add image_aspect_ratio property to attachments

This commit is contained in:
Pranas Kiziela 2018-11-13 14:38:34 +02:00
parent 73c6387c54
commit 92cd8b953b

View File

@ -18,6 +18,7 @@ import (
type AttachmentType string type AttachmentType string
type MessagingType string type MessagingType string
type TopElementStyle string type TopElementStyle string
type ImageAspectRatio string
const ( const (
// SendMessageURL is API endpoint for sending messages. // SendMessageURL is API endpoint for sending messages.
@ -45,6 +46,11 @@ const (
CompactTopElementStyle TopElementStyle = "compact" CompactTopElementStyle TopElementStyle = "compact"
// TopElementStyle is large. // TopElementStyle is large.
LargeTopElementStyle TopElementStyle = "large" LargeTopElementStyle TopElementStyle = "large"
// ImageAspectRatio is horizontal (1.91:1). Default.
HorizontalImageAspectRatio ImageAspectRatio = "horizontal"
// ImageAspectRatio is square.
SquareImageAspectRatio ImageAspectRatio = "square"
) )
// QueryResponse is the response sent back by Facebook when setting up things // QueryResponse is the response sent back by Facebook when setting up things
@ -351,6 +357,7 @@ type StructuredMessagePayload struct {
TemplateType string `json:"template_type,omitempty"` TemplateType string `json:"template_type,omitempty"`
TopElementStyle TopElementStyle `json:"top_element_style,omitempty"` TopElementStyle TopElementStyle `json:"top_element_style,omitempty"`
Text string `json:"text,omitempty"` Text string `json:"text,omitempty"`
ImageAspectRatio ImageAspectRatio `json:"image_aspect_ratio,omitempty"`
Elements *[]StructuredMessageElement `json:"elements,omitempty"` Elements *[]StructuredMessageElement `json:"elements,omitempty"`
Buttons *[]StructuredMessageButton `json:"buttons,omitempty"` Buttons *[]StructuredMessageButton `json:"buttons,omitempty"`
Url string `json:"url,omitempty"` Url string `json:"url,omitempty"`