processEvent

abstract suspend fun processEvent(transactionContext: <Error class: unknown class>, eventEnvelope: EventEnvelope): <Error class: unknown class><<Error class: unknown class>, String?>

Processes a single eventEnvelope using the provided transactionContext.

The underlying event is dispatched to the appropriate domain receiver (e.g., conversations, users).

This method does not mark the event as processed in the local store. Instead, on successful processing it returns the processed event id so the caller can mark it as processed after the surrounding crypto transaction has been successfully committed.

When disableEventProcessing is enabled, the event is consumed but no processing is performed, and null is returned.

If processing fails, no "processed" marker should be persisted by the caller.

Return

Either a CoreFailure if processing failed, or the processed event id (String) on success. If processing is intentionally skipped (e.g. disableEventProcessing), returns Right(null).

Parameters

transactionContext

Contains access to Proteus or MLS cryptographic context.

eventEnvelope

The envelope containing the event and its metadata.