Skip to main content

process_events

Function process_events 

Source
pub fn process_events(
    events: &[Value],
    initial_cursor: Option<String>,
    inbox_dir: &Path,
) -> Result<PullResult>
Expand description

Process a pulled-event batch. Mutates inbox files + relay state (via pair_invite side effects) but returns the new cursor target rather than writing it — caller persists.

initial_cursor is the pre-pull value of self.last_pulled_event_id. Returned advance_cursor_to is what the caller should write back. If the first event blocks the cursor, advance_cursor_to == initial_cursor (no change).