From 925f5a1294ee464514188fee181cd2fcee2be712 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 27 May 2026 12:57:30 +0100 Subject: [PATCH] Handle MSC4242 in redact --- rust/src/events/constants.rs | 2 ++ rust/src/events/utils.rs | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/rust/src/events/constants.rs b/rust/src/events/constants.rs index 26209e4ba0..5f1d8572eb 100644 --- a/rust/src/events/constants.rs +++ b/rust/src/events/constants.rs @@ -61,6 +61,8 @@ pub mod event_field { pub const REPLACES_STATE: &str = "replaces_state"; /// Event field: msc4354_sticky pub const MSC4354_STICKY: &str = "msc4354_sticky"; + // Event field: prev_state_events + pub const PREV_STATE_EVENTS: &str = "prev_state_events"; } pub mod unsigned_field { diff --git a/rust/src/events/utils.rs b/rust/src/events/utils.rs index c1a5d0e618..33a4849c53 100644 --- a/rust/src/events/utils.rs +++ b/rust/src/events/utils.rs @@ -24,8 +24,10 @@ use super::constants::{ redaction_field, unsigned_field::AGE_TS, }; -use crate::canonical_json::CanonicalizationOptions; use crate::room_versions::{EventFormatVersions, RoomVersion}; +use crate::{ + canonical_json::CanonicalizationOptions, events::constants::event_field::PREV_STATE_EVENTS, +}; /// Calculates the event_id of an event. /// @@ -99,7 +101,6 @@ pub fn redact(event: &Value, room_version: &RoomVersion) -> anyhow::Result anyhow::Result