pub struct InboundMessage {
pub id: String,
pub channel: Channel,
pub sender: String,
pub sender_name: Option<String>,
pub recipient: String,
pub reply_to: String,
pub body: String,
pub has_attachment: bool,
pub tenant_id: String,
pub channel_account_id: String,
pub raw_metadata: Value,
}Expand description
Unified inbound message from any channel.
Fields§
§id: String§channel: Channel§sender: String§sender_name: Option<String>§recipient: String§reply_to: StringDestination identifier for replies (phone number for WhatsApp; decoupled
so Discord channel_id / Telegram chat_id fit without pipeline changes).
body: String§has_attachment: bool§tenant_id: String§channel_account_id: String§raw_metadata: ValueImplementations§
Source§impl InboundMessage
impl InboundMessage
Sourcepub fn conversation_key(&self) -> String
pub fn conversation_key(&self) -> String
Conversation routing key for this inbound message.
For WhatsApp this is reply_to (the customer’s sender number).
Trait Implementations§
Source§impl Clone for InboundMessage
impl Clone for InboundMessage
Source§fn clone(&self) -> InboundMessage
fn clone(&self) -> InboundMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InboundMessage
impl Debug for InboundMessage
Source§impl<'de> Deserialize<'de> for InboundMessage
impl<'de> Deserialize<'de> for InboundMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InboundMessage
impl RefUnwindSafe for InboundMessage
impl Send for InboundMessage
impl Sync for InboundMessage
impl Unpin for InboundMessage
impl UnsafeUnpin for InboundMessage
impl UnwindSafe for InboundMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more