1
0
mirror of synced 2024-11-29 16:46:09 +03:00

Add TopElementStyle attribute to StructuredMessagePayload

This commit is contained in:
Vytautas Galaunia 2018-10-29 13:10:44 +02:00
parent 65752d0a98
commit 78e9ea3089

View File

@ -17,6 +17,7 @@ import (
// AttachmentType is attachment type. // AttachmentType is attachment type.
type AttachmentType string type AttachmentType string
type MessagingType string type MessagingType string
type TopElementStyle string
const ( const (
// SendMessageURL is API endpoint for sending messages. // SendMessageURL is API endpoint for sending messages.
@ -39,6 +40,11 @@ const (
MessageTagType MessagingType = "MESSAGE_TAG" MessageTagType MessagingType = "MESSAGE_TAG"
// NonPromotionalSubscriptionType is NON_PROMOTIONAL_SUBSCRIPTION messaging type // NonPromotionalSubscriptionType is NON_PROMOTIONAL_SUBSCRIPTION messaging type
NonPromotionalSubscriptionType MessagingType = "NON_PROMOTIONAL_SUBSCRIPTION" NonPromotionalSubscriptionType MessagingType = "NON_PROMOTIONAL_SUBSCRIPTION"
// TopElementStyle is compact.
CompactTopElementStyle TopElementStyle = "compact"
// TopElementStyle is large.
LargeTopElementStyle TopElementStyle = "large"
) )
// QueryResponse is the response sent back by Facebook when setting up things // QueryResponse is the response sent back by Facebook when setting up things
@ -343,6 +349,7 @@ type StructuredMessageAttachment struct {
type StructuredMessagePayload struct { type StructuredMessagePayload struct {
// TemplateType must be button, generic or receipt // TemplateType must be button, generic or receipt
TemplateType string `json:"template_type,omitempty"` TemplateType string `json:"template_type,omitempty"`
TopElementStyle TopElementStyle `json:"top_element_style,omitempty"`
Text string `json:"text,omitempty"` Text string `json:"text,omitempty"`
Elements *[]StructuredMessageElement `json:"elements,omitempty"` Elements *[]StructuredMessageElement `json:"elements,omitempty"`
Buttons *[]StructuredMessageButton `json:"buttons,omitempty"` Buttons *[]StructuredMessageButton `json:"buttons,omitempty"`