This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -469,18 +469,16 @@ async def clone_existing_room(
469
469
(EventTypes .PowerLevels , "" ),
470
470
]
471
471
472
- # Copy the room type as per MSC3818 https://github.com/matrix-org/matrix-spec-proposals/pull/3818.
473
- if old_room_create_event .content .get (EventContentFields .ROOM_TYPE ) is not None :
472
+ # Copy the room type as per MSC3818.
473
+ room_type = old_room_create_event .content .get (EventContentFields .ROOM_TYPE )
474
+ if room_type is not None :
474
475
creation_content [
475
476
EventContentFields .ROOM_TYPE
476
477
] = old_room_create_event .content .get (EventContentFields .ROOM_TYPE )
477
478
478
- # If the old room was a space, copy over the rooms in the space.
479
- if (
480
- old_room_create_event .content .get (EventContentFields .ROOM_TYPE )
481
- == RoomTypes .SPACE
482
- ):
483
- types_to_copy .append ((EventTypes .SpaceChild , None ))
479
+ # If the old room was a space, copy over the rooms in the space.
480
+ if room_type == RoomTypes .SPACE :
481
+ types_to_copy .append ((EventTypes .SpaceChild , None ))
484
482
485
483
old_room_state_ids = await self .store .get_filtered_current_state_ids (
486
484
old_room_id , StateFilter .from_types (types_to_copy )
You can’t perform that action at this time.
0 commit comments