Skip to main content

apply_redact

Function apply_redact 

Source
pub fn apply_redact(
    conn: &mut Connection,
    room_id: &str,
    caller_user_id: i64,
    caller_mxid: &str,
    device_id: &str,
    txn_id: &str,
    target_event_id: &str,
    redaction_event_id: &str,
    reason: Option<&str>,
    now: &str,
    origin_ts: i64,
) -> Result<RedactOutcome, MatrixError>
Expand description

PUT /redact/{eventId}/{txnId}’s whole DB-side decision + write (plan §4 redact row): txn-dedup peek first; then Member; then own-event OR PowerCheck(redact) — redact does NOT require the sender’s level to exceed the target’s own level (spec rule, unlike kick/ban/unban); then the dedup-checked redaction itself (which enforces the v11 unredactable-event-type rule and maps to 403 via MatrixStoreError::UnredactableEvent).