From 27e312ddaf03f65dbd7cc122605006fa3e4735f2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 21 May 2026 14:26:02 +0100 Subject: [PATCH] Make JsonObject.object private --- rust/src/events/json_object.rs | 2 +- rust/src/events/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/events/json_object.rs b/rust/src/events/json_object.rs index 274956b3a3..bb4877d482 100644 --- a/rust/src/events/json_object.rs +++ b/rust/src/events/json_object.rs @@ -37,7 +37,7 @@ use serde::{Deserialize, Serialize}; #[pyclass(mapping, frozen, skip_from_py_object)] #[serde(transparent)] pub struct JsonObject { - pub object: Arc, serde_json::Value>>, + object: Arc, serde_json::Value>>, } #[pymethods] diff --git a/rust/src/events/mod.rs b/rust/src/events/mod.rs index b4c818ccfe..6ec02dfb3c 100644 --- a/rust/src/events/mod.rs +++ b/rust/src/events/mod.rs @@ -503,7 +503,7 @@ impl Event { fn redacts<'py>(&self, py: Python<'py>) -> PyResult>> { let common = &self.fields.common_fields; let value = if self.room_version.updated_redaction_rules { - common.content.object.get(REDACTS) + common.content.get_field(REDACTS) } else { common.other_fields.get(REDACTS) };