From 8799a9aa11ba6d905f1a78321755f6ae8ebf55a5 Mon Sep 17 00:00:00 2001 From: damocles Date: Tue, 16 Jun 2026 11:06:39 +0200 Subject: [PATCH] hive-matrix-mcp: document redaction power-level + concurrency semantics --- hive-matrix-mcp/src/handlers.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hive-matrix-mcp/src/handlers.rs b/hive-matrix-mcp/src/handlers.rs index b34ef1eb..4a8a8f05 100644 --- a/hive-matrix-mcp/src/handlers.rs +++ b/hive-matrix-mcp/src/handlers.rs @@ -423,7 +423,11 @@ pub async fn send_redact( }; // Redaction is irreversible: the homeserver drops the event content and // keeps only the shell + reason. A fresh txn id (None) is fine — this is - // a one-shot operator/agent action, not a retried send. + // a one-shot operator/agent action, not a retried send. Power level is + // enforced server-side (own events always; others' need a moderator PL), + // so a redact that races a concurrent edit is resolved by the server. + // NOTE(droggelbecher): no client-side pre-check — we let the server be + // the authority on both permission and ordering. match room.redact(&eid, reason, None).await { Ok(resp) => DaemonResponse::ok(&serde_json::json!({ "event_id": resp.event_id.to_string(),