Capitalize contants
This commit is contained in:
parent
d5cc794598
commit
b49a30a972
|
@ -90,5 +90,5 @@ class RejectedReason(object):
|
||||||
|
|
||||||
|
|
||||||
class RoomCreationPreset(object):
|
class RoomCreationPreset(object):
|
||||||
PrivateChat = "private_chat"
|
PRIVATE_CHAT = "private_chat"
|
||||||
PublicChat = "public_chat"
|
PUBLIC_CHAT = "public_chat"
|
||||||
|
|
|
@ -36,12 +36,12 @@ logger = logging.getLogger(__name__)
|
||||||
class RoomCreationHandler(BaseHandler):
|
class RoomCreationHandler(BaseHandler):
|
||||||
|
|
||||||
PRESETS_DICT = {
|
PRESETS_DICT = {
|
||||||
RoomCreationPreset.PrivateChat: {
|
RoomCreationPreset.PRIVATE_CHAT: {
|
||||||
"join_rules": JoinRules.INVITE,
|
"join_rules": JoinRules.INVITE,
|
||||||
"history_visibility": "invited",
|
"history_visibility": "invited",
|
||||||
"everyone_ops": False,
|
"everyone_ops": False,
|
||||||
},
|
},
|
||||||
RoomCreationPreset.PublicChat: {
|
RoomCreationPreset.PUBLIC_CHAT: {
|
||||||
"join_rules": JoinRules.PUBLIC,
|
"join_rules": JoinRules.PUBLIC,
|
||||||
"history_visibility": "shared",
|
"history_visibility": "shared",
|
||||||
"everyone_ops": False,
|
"everyone_ops": False,
|
||||||
|
@ -138,9 +138,9 @@ class RoomCreationHandler(BaseHandler):
|
||||||
|
|
||||||
preset_config = config.get(
|
preset_config = config.get(
|
||||||
"preset",
|
"preset",
|
||||||
RoomCreationPreset.PublicChat
|
RoomCreationPreset.PUBLIC_CHAT
|
||||||
if is_public
|
if is_public
|
||||||
else RoomCreationPreset.PrivateChat
|
else RoomCreationPreset.PRIVATE_CHAT
|
||||||
)
|
)
|
||||||
|
|
||||||
user = UserID.from_string(user_id)
|
user = UserID.from_string(user_id)
|
||||||
|
|
Loading…
Reference in New Issue