Normalized inbound message from an external chat gateway.
Platform adapters should download/copy media to local files or session artifacts before constructing this struct. The rest of Vibe can then process text, attachments, source identity, and replies without depending on Telegram or any other platform SDK.
Summary
Functions
Extracts a slash command name without the leading slash or bot suffix.
Returns true when the message text starts with a slash command.
Returns the text after a slash command, normalizing common mobile dash substitutions.
Builds a normalized gateway message.
Types
@type message_type() ::
:text
| :command
| :photo
| :video
| :audio
| :voice
| :document
| :sticker
| :location
@type t() :: %Vibe.Gateway.Message{ id: String.t() | nil, media: [media()], metadata: map(), platform_update_id: String.t() | integer() | nil, reply_to_message_id: String.t() | nil, reply_to_text: String.t() | nil, source: Vibe.Gateway.Source.t(), text: String.t(), timestamp: DateTime.t() | nil, type: message_type() }
Functions
Extracts a slash command name without the leading slash or bot suffix.
Returns true when the message text starts with a slash command.
Returns the text after a slash command, normalizing common mobile dash substitutions.
@spec new( Vibe.Gateway.Source.t(), keyword() ) :: t()
Builds a normalized gateway message.