Wax.Messages.Message (wax v1.1.4)
The Whatsapp message
It defines a structure and main functions to work with it to modify the message to send
Summary
Functions
Adds an audio object to the message
Adds a document object to the message
Adds an image object to the message
Adds an interactive object to the message
Adds a template object to the message
Adds a video object to the message
Creates a new Message structure
Adds a text object to the message
Validates a message
Types
@type t() :: %Wax.Messages.Message{ audio: Wax.Messages.Media.t(), contacts: [Wax.Messages.Contact.t()], context: Wax.Messages.Context.t(), document: Wax.Messages.Media.t(), image: Wax.Messages.Media.t(), interactive: Wax.Messages.Interactive.t(), location: Wax.Messages.Location.t(), messaging_product: atom(), preview_url: boolean(), recipient_type: atom(), status: String.t(), template: Wax.Messages.Template.t(), text: Wax.Messages.Text.t(), to: whatsapp_id(), type: message_type(), video: Wax.Messages.Media.t() }
Functions
Adds an audio object to the message
Adds a document object to the message
Adds an image object to the message
Images also accept a text caption that can be added on the same message
@spec add_interactive(t(), Wax.Messages.Interactive.t()) :: t()
Adds an interactive object to the message
@spec add_template(t(), Wax.Messages.Template.t()) :: t()
Adds a template object to the message
Adds a video object to the message
Videos also accept a text caption that can be added on the same message
@spec new(whatsapp_id()) :: t()
Creates a new Message structure
Adds a text object to the message
Validates a message
Checks if a message is valid to be sent to the Cloud API
#TODO: Move this functionality to its own module