pub struct IncomingMessage {
pub channel_id: String,
pub sender_id: String,
pub sender_display: String,
pub content: String,
pub is_dm: bool,
pub attachments: Vec<String>,
pub platform_metadata: Value,
}Expand description
A user-sent message, normalized across platforms.
Fields§
§channel_id: StringPlatform-specific channel id, namespaced. Examples:
“discord:guild-X:channel-Y” / “discord:dm:user-Z”
“telegram:chat-123”
“slack:T01:C02”
The platform-prefix lets MessagingHub route replies back
without consulting the adapter.
sender_id: StringPlatform user id of the sender (for DM-back, attribution).
sender_display: StringDisplay name when the platform exposes one (“jeffadkins”, “@jeff_adkins”, “Jeff (Acme corp)”). Empty string is allowed.
content: StringPlain-text content. Adapters strip platform markup (Discord’s <@mention> tags, Telegram’s @bot prefix, etc.) before populating.
is_dm: boolTrue when the message was a direct message rather than a public channel post. Drives default privacy / approval-prompt routing.
attachments: Vec<String>Attachment URLs the message included (image / file). Empty when the platform attachment hasn’t been resolved to a URL yet OR the message had none.
platform_metadata: ValueFree-form per-platform metadata (Discord guild_id, Telegram thread_id, Slack thread_ts). Adapters serialize whatever they might need to honor a reply later. Read-only — agent shouldn’t mutate this.
Implementations§
Trait Implementations§
Source§impl Clone for IncomingMessage
impl Clone for IncomingMessage
Source§fn clone(&self) -> IncomingMessage
fn clone(&self) -> IncomingMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more