Skip to main content

apply_send_to_device

Function apply_send_to_device 

Source
pub fn apply_send_to_device(
    conn: &mut Connection,
    sender_user_id: i64,
    sender_device_id: &str,
    event_type: &str,
    txn_id: &str,
    messages: &BTreeMap<String, BTreeMap<String, Value>>,
    now: &str,
) -> Result<SendToDeviceOutcome, MatrixError>
Expand description

DB-only core for PUT /sendToDevice/{eventType}/{txnId}: txn-deduped per (sender_user_id, sender_device_id, txn_id) — a repeat is a no-op — then expand_send_to_device_targets and one atomic dedup-checked enqueue (crate::keys::enqueue_to_device_deduped).