2016-04-13 09:14:23 +03:00
|
|
|
package messenger
|
|
|
|
|
2016-04-14 02:47:15 +03:00
|
|
|
// Action is used to determine what kind of message a webhook event is.
|
2016-04-13 09:14:23 +03:00
|
|
|
type Action int
|
|
|
|
|
|
|
|
const (
|
2016-04-14 02:47:15 +03:00
|
|
|
// UnknownAction means that the event was not able to be classified.
|
2016-04-13 09:14:23 +03:00
|
|
|
UnknownAction Action = iota - 1
|
2016-04-14 02:47:15 +03:00
|
|
|
// TextAction means that the event was a text message (May contain attachments).
|
2016-04-13 09:14:23 +03:00
|
|
|
TextAction
|
2016-08-18 02:41:25 +03:00
|
|
|
// DeliveryAction means that the event was advising of a successful delivery to a
|
|
|
|
// previous recipient.
|
2016-04-13 12:12:23 +03:00
|
|
|
DeliveryAction
|
2016-08-18 02:41:25 +03:00
|
|
|
// ReadAction means that the event was a previous recipient reading their respective
|
|
|
|
// messages.
|
|
|
|
ReadAction
|
2021-02-17 15:15:29 +03:00
|
|
|
// PostBackAction represents post call back.
|
2016-05-03 16:42:25 +03:00
|
|
|
PostBackAction
|
2021-02-17 15:15:29 +03:00
|
|
|
// OptInAction represents opting in through the Send to Messenger button.
|
2016-12-08 23:52:21 +03:00
|
|
|
OptInAction
|
2021-02-17 15:15:29 +03:00
|
|
|
// ReferralAction represents ?ref parameter in m.me URLs.
|
2017-02-17 05:29:12 +03:00
|
|
|
ReferralAction
|
2018-03-10 12:12:35 +03:00
|
|
|
// AccountLinkingAction means that the event concerns changes in account linking
|
|
|
|
// status.
|
|
|
|
AccountLinkingAction
|
2016-04-13 09:14:23 +03:00
|
|
|
)
|
2022-07-29 15:40:30 +03:00
|
|
|
|
|
|
|
// SenderAction is used to send a specific action (event) to the Facebook.
|
|
|
|
// The result of sending said action is supposed to give more interactivity to the bot.
|
|
|
|
type SenderAction string
|
|
|
|
|
|
|
|
const (
|
|
|
|
// MarkSeen marks message as seen.
|
|
|
|
MarkSeen SenderAction = "MARK_SEEN"
|
|
|
|
// TypingOn turns on "Bot is typing..." indicator.
|
|
|
|
TypingOn SenderAction = "TYPING_ON"
|
|
|
|
// TypingOff turns off typing indicator.
|
|
|
|
TypingOff SenderAction = "TYPING_OFF"
|
|
|
|
// React to the message.
|
|
|
|
React SenderAction = "REACT"
|
|
|
|
// Unreact to the message (remove reaction).
|
|
|
|
Unreact SenderAction = "UNREACT"
|
|
|
|
)
|