pub struct InboundEvent {
pub event_id: String,
pub conversation: ConversationKey,
pub author: UserRef,
pub text: String,
pub attachments: Vec<Attachment>,
pub mentions_bot: bool,
pub is_direct: bool,
pub restricted: bool,
pub message_id: Option<MessageId>,
pub sent_at: Timestamp,
pub locale: Option<String>,
}Expand description
A message received from a platform, normalized by its channel adapter.
Fields§
§event_id: StringPlatform event or message id, used to drop duplicate deliveries.
conversation: ConversationKeyThe conversation it belongs to.
Who wrote it.
text: StringThe text, with mentions of the bot removed and other mentions written as @name.
attachments: Vec<Attachment>Media sent with the message.
mentions_bot: boolThe bot was mentioned (or replied to, on platforms that only deliver such group messages).
is_direct: boolA one-to-one conversation with the bot.
restricted: boolThe platform withheld the content (for example Zalo’s message.unsupported.received for
protected users). The runtime answers with a fixed message and never calls an agent.
message_id: Option<MessageId>Platform message id, used to reply to this message where supported.
sent_at: TimestampWhen the platform says it was sent (or when it was received, if unknown).
locale: Option<String>The author’s language as the platform reports it (en-US, ja, vi), when it does:
Discord slash commands and button presses, Telegram messages. Plain Discord, Slack, Google
Chat and Zalo messages carry none.