diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-24 14:36:49 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-24 14:36:49 +0000 |
commit | 756fe3c0be441e9b434f8e3c238bd48a04c38d6d (patch) | |
tree | 6a4c4f67fae42e8d6bfc4c595350bda9b989e76b /synapse/handlers | |
parent | Merge commit '6a3504636' into dinsic-release-v1.12.x (diff) | |
parent | Remove special casing of `m.room.aliases` events (#7034) (diff) | |
download | synapse-756fe3c0be441e9b434f8e3c238bd48a04c38d6d.tar.xz |
Remove special casing of `m.room.aliases` events (#7034)
* commit '60724c46b': Remove special casing of `m.room.aliases` events (#7034)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/room.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index f0dfcb9158..b13a2b94b6 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -294,16 +294,6 @@ class RoomCreationHandler(BaseHandler): except AuthError as e: logger.warning("Unable to update PLs in old room: %s", e) - new_pl_content = copy_power_levels_contents(old_room_pl_state.content) - - # pre-msc2260 rooms may not have the right setting for aliases. If no other - # value is set, set it now. - events_default = new_pl_content.get("events_default", 0) - new_pl_content.setdefault("events", {}).setdefault( - EventTypes.Aliases, events_default - ) - - logger.debug("Setting correct PLs in new room to %s", new_pl_content) yield self.event_creation_handler.create_and_send_nonmember_event( requester, { @@ -311,7 +301,7 @@ class RoomCreationHandler(BaseHandler): "state_key": "", "room_id": new_room_id, "sender": requester.user.to_string(), - "content": new_pl_content, + "content": old_room_pl_state.content, }, ratelimit=False, ) @@ -834,10 +824,6 @@ class RoomCreationHandler(BaseHandler): EventTypes.RoomHistoryVisibility: 100, EventTypes.CanonicalAlias: 50, EventTypes.RoomAvatar: 50, - # MSC2260: Allow everybody to send alias events by default - # This will be reudundant on pre-MSC2260 rooms, since the - # aliases event is special-cased. - EventTypes.Aliases: 0, EventTypes.Tombstone: 100, EventTypes.ServerACL: 100, }, |