pub struct OutgoingMessage {
pub kind: MessageKind,
pub body: String,
pub reply_to: Option<EventId>,
pub edit_of: Option<EventId>,
}Expand description
One message a caller wants sent via MessengerCommand::SendMessage —
M13b’s binding content shape: text/notice/emote, an optional reply
pointer, and an optional edit target (which must name one of the
caller’s own already-sent events — MessengerCore::dispatch rejects
an edit of someone else’s event rather than silently sending a
replacement the room’s other members will refuse to accept, per
m.replace’s own “must come from the original sender” rule,
crate::room::relations’s own module doc). reply_to and edit_of
are mutually exclusive at the wire level — if both are set, edit_of
wins (an edit’s own m.relates_to is m.replace, not a reply).
Fields§
§kind: MessageKindWhich msgtype this renders as.
body: StringThe message’s own plain-text body (the edited/new body, if this is an edit).
reply_to: Option<EventId>A rich-reply pointer (m.in_reply_to), if any.
edit_of: Option<EventId>The event this message replaces, if this is an edit — must be one of the caller’s own already-sent events (this module’s own doc).