Skip to main content

save_event

Function save_event 

Source
pub async fn save_event(event: &StoredEvent) -> Result<(), String>
Expand description

Save a StoredEvent to the events table.

Primary storage function for the flat event architecture. Conditionally encrypts message/edit content based on user setting. Uses INSERT OR REPLACE with COALESCE to preserve existing wrapper_event_id.