diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-12-16 08:46:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 08:46:37 -0500 |
commit | be2db93b3c14396d53d30f8d5f92db014453487b (patch) | |
tree | 45d487763583c8791da8f62f9e9949f72ee21edb /synapse/handlers/room.py | |
parent | Preparatory refactoring of the SamlHandlerTestCase (#8938) (diff) | |
download | synapse-be2db93b3c14396d53d30f8d5f92db014453487b.tar.xz |
Do not assume that the contents dictionary includes history_visibility. (#8945)
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 7583418946..1f809fa161 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -27,6 +27,7 @@ from typing import TYPE_CHECKING, Any, Awaitable, Dict, List, Optional, Tuple from synapse.api.constants import ( EventTypes, + HistoryVisibility, JoinRules, Membership, RoomCreationPreset, @@ -81,21 +82,21 @@ class RoomCreationHandler(BaseHandler): self._presets_dict = { RoomCreationPreset.PRIVATE_CHAT: { "join_rules": JoinRules.INVITE, - "history_visibility": "shared", + "history_visibility": HistoryVisibility.SHARED, "original_invitees_have_ops": False, "guest_can_join": True, "power_level_content_override": {"invite": 0}, }, RoomCreationPreset.TRUSTED_PRIVATE_CHAT: { "join_rules": JoinRules.INVITE, - "history_visibility": "shared", + "history_visibility": HistoryVisibility.SHARED, "original_invitees_have_ops": True, "guest_can_join": True, "power_level_content_override": {"invite": 0}, }, RoomCreationPreset.PUBLIC_CHAT: { "join_rules": JoinRules.PUBLIC, - "history_visibility": "shared", + "history_visibility": HistoryVisibility.SHARED, "original_invitees_have_ops": False, "guest_can_join": False, "power_level_content_override": {}, |