1
0
mirror of synced 2024-11-22 04:46:05 +03:00
messenger/settings.go
Ilyas Salikhov f7a3ef787f * Added ability to set greeting setting, get started setting and persistent menu setting
* Added IsEcho in Message which is indicator of own messages
* Added QuickReply in Message for sending of quick reply buttons with message
* Added mux parameter in Messenger constructor. It is useful when single go app processes the several bots
* Added Messenger.SenderAction which allows to show writing and reading status
* Added Messenger.GreetingSetting and Messenger.CallToActionsSetting which allow to set the bot settings
* Fixed bug with nil returning instead of error object
2016-09-11 22:49:56 +03:00

28 lines
853 B
Go

package messenger
// 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"`
}