From b49a30a972470914531c89cd481252e414b22d0e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 14 Jul 2015 10:20:31 +0100 Subject: Capitalize contants --- synapse/api/constants.py | 4 ++-- synapse/handlers/room.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/synapse/api/constants.py b/synapse/api/constants.py index 885b9c3596..7156ee4e7d 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -90,5 +90,5 @@ class RejectedReason(object): class RoomCreationPreset(object): - PrivateChat = "private_chat" - PublicChat = "public_chat" + PRIVATE_CHAT = "private_chat" + PUBLIC_CHAT = "public_chat" diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index c654395437..11f531dc75 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -36,12 +36,12 @@ logger = logging.getLogger(__name__) class RoomCreationHandler(BaseHandler): PRESETS_DICT = { - RoomCreationPreset.PrivateChat: { + RoomCreationPreset.PRIVATE_CHAT: { "join_rules": JoinRules.INVITE, "history_visibility": "invited", "everyone_ops": False, }, - RoomCreationPreset.PublicChat: { + RoomCreationPreset.PUBLIC_CHAT: { "join_rules": JoinRules.PUBLIC, "history_visibility": "shared", "everyone_ops": False, @@ -138,9 +138,9 @@ class RoomCreationHandler(BaseHandler): preset_config = config.get( "preset", - RoomCreationPreset.PublicChat + RoomCreationPreset.PUBLIC_CHAT if is_public - else RoomCreationPreset.PrivateChat + else RoomCreationPreset.PRIVATE_CHAT ) user = UserID.from_string(user_id) -- cgit 1.4.1