Skip to main content

prepare_local

Function prepare_local 

Source
pub fn prepare_local(
    tx: &Transaction<'_>,
    room_id: &str,
    sender_user_id: i64,
    kind: &str,
    state_key: Option<&str>,
    content: &str,
    ts: i64,
) -> Result<Option<Prepared>, MatrixStoreError>
Expand description

Called from the store’s two write functions for every event a local user creates. None: the room is legacy, the caller keeps its own id. Some: the event was built, checked against the room’s auth rules, signed and stored in tx; the caller writes its projection with this id.