Documentation
¶
Index ¶
Constants ¶
View Source
const TypeMsg string = "msg"
TypeMsg is a constant for incoming messages
Variables ¶
This section is empty.
Functions ¶
func Read ¶ added in v0.249.0
func Read(sa flows.SessionAssets, data []byte, missing assets.MissingCallback) (flows.Input, error)
Read reads an input from the given typed envelope
Types ¶
type Msg ¶ added in v0.249.0
type Msg struct {
// contains filtered or unexported fields
}
Msg is a message which can be used as input
func NewMsg ¶ added in v0.48.0
func NewMsg(sa flows.SessionAssets, evt *events.MsgReceived) *Msg
NewMsg creates a new user input based on a message event
func (*Msg) Context ¶ added in v0.249.0
Context returns the properties available in expressions
__default__:text -> the text and attachments uuid:text -> the UUID of the input created_on:datetime -> the creation date of the input channel:channel -> the channel that the input was received on urn:text -> the contact URN that the input was received on text:text -> the text part of the input attachments:[]text -> any attachments on the input external_id:text -> the external ID of the input
@context input
func (*Msg) MarshalJSON ¶ added in v0.249.0
MarshalJSON marshals this msg input into JSON
Click to show internal directories.
Click to hide internal directories.