pub fn enqueue_to_device(
conn: &mut Connection,
sender_user_id: i64,
messages: &[(i64, String, String, String)],
) -> Result<i64>Expand description
Fan out one PUT /sendToDevice call’s messages map (already flattened
to one row per (recipient_user_id, recipient_device_id) — a *
device wildcard is resolved by the caller before this function ever
sees it) as one transaction sharing matrix_store’s global stream
counter. Returns the last stream id minted, or the counter’s current
value unchanged if messages is empty.