1
0
mirror of synced 2024-11-22 12:56:06 +03:00

Add missing fields of CallToActionItem (#22)

* Adding WebViewHeightRatio and MessengerExtension fields

* Adding constants and documentation
This commit is contained in:
Depado 2016-12-09 11:04:14 +01:00 committed by Harrison Shoebridge
parent a5faf5be5c
commit 87975a1970

View File

@ -1,5 +1,22 @@
package messenger package messenger
// Defines the different sizes available when setting up a CallToActionsItem
// of type "web_url". These values can be used in the "WebviewHeightRatio"
// field.
const (
// WebviewCompact opens the page in a web view that takes half the screen
// and covers only part of the conversation.
WebviewCompact = "compact"
// WebviewTall opens the page in a web view that covers about 75% of the
// conversation.
WebviewTall = "tall"
// WebviewFull opens the page in a web view that completely covers the
// conversation, and has a "back" button instead of a "close" one.
WebviewFull = "full"
)
// GreetingSetting is the setting for greeting message // GreetingSetting is the setting for greeting message
type GreetingSetting struct { type GreetingSetting struct {
SettingType string `json:"setting_type"` SettingType string `json:"setting_type"`
@ -24,4 +41,6 @@ type CallToActionsItem struct {
Title string `json:"title,omitempty"` Title string `json:"title,omitempty"`
Payload string `json:"payload,omitempty"` Payload string `json:"payload,omitempty"`
URL string `json:"url,omitempty"` URL string `json:"url,omitempty"`
WebviewHeightRatio string `json:"webview_height_ratio,omitempty"`
MessengerExtension bool `json:"messenger_extensions,omitempty"`
} }