Examples on this page target source snapshot
35a69a14, not a crates.io release. Use the current API guide to select the matching dependency.Create an event
Use the builder for the non-exhaustiveEventCreationParams. Only the name is required; creation rejects a blank name before sending. Times are Unix seconds.
Store the result
The example above demonstrates an immediate RSVP. Before returning or dropping the result, persist its secret together with the original event ID, chat, original author/direction and exact crypto creator. Incoming responses require that retained association afterCreatedEvent is gone.
CreatedEvent owns the send result, crypto creator and MessageSecret. Use event_ref() to borrow those for an RSVP. Use into_parts() when transferring ownership to storage. Do not destructure the result as the old tuple or infer the crypto creator from a PN/LID display alias.
Debug redacts the whole creation result. Explicitly reading its secret or nested protobuf exposes sensitive data.
Respond to a received event
CombineInboundMessage::message_ref() with the original creator and validated secret using EventRef::new. respond(&EventRef, response, extra_guests) produces an encrypted RSVP. respond_raw is the explicit byte/ID interoperability entry point.
For manual RSVP decryption, the core helper wacore::event::decrypt_event_response_with_secret requires that same parent association. Do not reuse a vote’s secret or a new send’s ID.
Edit an event
UseEditRequest::new(target, replacement).with_secret(created.creator(), created.secret()). The target addresses the original content; the returned send result describes the edit operation. Read the send task reference before overriding operation IDs.