Documentation ¶
Index ¶
Constants ¶
View Source
const TypeMsg string = "msg"
TypeMsg is the type of our message wait
Variables ¶
This section is empty.
Functions ¶
func ReadWait ¶ added in v0.11.0
func ReadWait(data json.RawMessage) (flows.Wait, error)
ReadWait reads a wait from the given JSON
func RegisterType ¶ added in v0.11.0
RegisterType registers a new type of wait
Types ¶
type MediaType ¶ added in v0.23.0
type MediaType string
MediaType describes a type of media we're waiting for. See note on `media_hint` field below.
type MsgWait ¶
type MsgWait struct { // Waits can indicate to the caller what type of media the flow is expecting. In the case of flows of type // messaging_offline, this should be considered a requirement and the client should only reply with a message // containing an attachment of that type. In the case of other flow types this should be considered only a // hint to the channel, which may or may not support prompting the contact for media of that type. MediaHint_ MediaType `json:"media_hint,omitempty"` // contains filtered or unexported fields }
MsgWait is a wait which waits for an incoming message (i.e. a msg_received event)
func NewMsgWait ¶ added in v0.4.0
NewMsgWait creates a new message wait
func (*MsgWait) Timeout ¶
func (w *MsgWait) Timeout() *int
Timeout returns the timeout of this wait in seconds or nil if no timeout is set
Click to show internal directories.
Click to hide internal directories.