This repository has been archived by the owner on Jan 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
/
settings.go
55 lines (47 loc) · 2 KB
/
settings.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
type GreetingSetting struct {
SettingType string `json:"setting_type"`
Greeting GreetingInfo `json:"greeting"`
}
// GreetingInfo contains greeting message
type GreetingInfo struct {
Text string `json:"text"`
}
// CallToActionsSetting is the settings for Get Started and Persist Menu
type CallToActionsSetting struct {
SettingType string `json:"setting_type"`
ThreadState string `json:"thread_state"`
CallToActions []CallToActionsItem `json:"call_to_actions"`
}
// CallToActionsItem contains Get Started button or item of Persist Menu
type CallToActionsItem struct {
Type string `json:"type,omitempty"`
Title string `json:"title,omitempty"`
Payload string `json:"payload,omitempty"`
URL string `json:"url,omitempty"`
WebviewHeightRatio string `json:"webview_height_ratio,omitempty"`
MessengerExtension bool `json:"messenger_extensions,omitempty"`
}
// HomeURL is the settings for EnableChatExtension
// https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/home-url
type HomeURL struct {
URL string `json:"url,omitempty"`
WebviewHeightRatio string `json:"webview_height_ratio,omitempty"`
WebviewShareButton string `json:"webview_share_button,omitempty"`
InTest bool `json:"in_test,omitempty"`
}