Use unsigned_mut for stripping room state

This commit is contained in:
Erik Johnston authored and Erik Johnston committed 2026-06-22 10:59:24 +01:00
1 parent 722407f341
commit ebb587e426
1 file changed
+3 -4
+3 -4
View File
@@ -527,10 +527,9 @@ fn serialize_event_value(
// Strip invite/knock room state unless requested.
if !config.include_stripped_room_state {
if let Some(Value::Object(unsigned)) = d.get_mut(UNSIGNED) {
unsigned.remove(unsigned_field::INVITE_ROOM_STATE);
unsigned.remove(unsigned_field::KNOCK_ROOM_STATE);
}
let unsigned = unsigned_mut(&mut d);
unsigned.remove(unsigned_field::INVITE_ROOM_STATE);
unsigned.remove(unsigned_field::KNOCK_ROOM_STATE);
}
if config.as_client_event {