pub struct MessageSource {
pub chat: Jid,
pub sender: Jid,
pub is_from_me: bool,
pub is_group: bool,
pub addressing_mode: Option<AddressingMode>,
pub sender_alt: Option<Jid>,
pub recipient_alt: Option<Jid>,
pub broadcast_list_owner: Option<Jid>,
pub recipient: Option<Jid>,
}Fields§
§chat: Jid§sender: Jid§is_from_me: bool§is_group: bool§addressing_mode: Option<AddressingMode>§sender_alt: Option<Jid>§recipient_alt: Option<Jid>§broadcast_list_owner: Option<Jid>§recipient: Option<Jid>Implementations§
Source§impl MessageSource
impl MessageSource
Sourcepub fn is_self_fanout(&self) -> bool
pub fn is_self_fanout(&self) -> bool
Our own outgoing DM to a user or bot, echoed back to this device
(is_from_me with a recipient). The server’s offline queue only
releases these on a <receipt type="sender">, so they must not be
cleared with a bare transport ack. Group/status/newsletter threads are
excluded (chat is checked too, since the own-from parser derives
chat from recipient and leaves is_group defaulted).
The author is a bot but the chat is not a bot chat (WA Web’s
h = !chat.isBot() && author.isBot()). WA Web clears these with a
bot-invoke-response <ack> (sendBotInvokeResponseAcks), NOT a
<receipt>, so both the success/duplicate ack path and the
decrypt-failure path must route them to the bare ack, not the sender
receipt, even though such an own message is also an Self::is_self_fanout.
Trait Implementations§
Source§impl Clone for MessageSource
impl Clone for MessageSource
Source§fn clone(&self) -> MessageSource
fn clone(&self) -> MessageSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MessageSource
impl Debug for MessageSource
Source§impl Default for MessageSource
impl Default for MessageSource
Source§fn default() -> MessageSource
fn default() -> MessageSource
Source§impl Serialize for MessageSource
impl Serialize for MessageSource
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for MessageSource
impl RefUnwindSafe for MessageSource
impl Send for MessageSource
impl Sync for MessageSource
impl Unpin for MessageSource
impl UnsafeUnpin for MessageSource
impl UnwindSafe for MessageSource
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more