Skip to main content

dispatch_event

Function dispatch_event 

Source
pub async fn dispatch_event(
    session: &SessionGuard,
    event: Event,
    handler: Arc<dyn InboundEventHandler>,
)
Expand description

Route an arriving Community event: a CONTROL/REKEY edition triggers a realtime control refresh; any other (message/reaction/edit/delete/presence/typing/webxdc/kick) is opened against its channel via inbound::process_incoming, persisted, and dispatched to handler. session straddles the relay I/O so a mid-flight account swap can’t write into the swapped-in account.