Skip to main content

process_incoming

Function process_incoming 

Source
pub fn process_incoming(
    state: &mut ChatState,
    event: &Event,
    channel: &Channel,
    my_pubkey: &PublicKey,
) -> Option<IncomingEvent>
Expand description

Open a single incoming wire event against channel, verify the binding, and apply it to STATE by sub-kind: a message is ingested, a reaction/edit is applied to its target. Events that fail to open (wrong key, splice, forged sig, bad version) or that dedup/target-miss are dropped (returns None). This is the per-event handler the real-time subscription routes each arriving 3300/3301/3302 event through.