mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-25 06:13:16 +00:00
Use unsigned_mut for stripping room state
This commit is contained in:
1 parent
722407f341
commit
ebb587e426
1 file changed
+3
-4
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user