mirror of
https://github.com/element-hq/synapse
synced 2024-10-02 23:12:41 +00:00
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/login_token
This commit is contained in:
commit
9434ad729a
2 changed files with 12 additions and 3 deletions
|
@ -32,9 +32,9 @@ def start(configfile):
|
|||
print "Starting ...",
|
||||
args = SYNAPSE
|
||||
args.extend(["--daemonize", "-c", configfile])
|
||||
cwd = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
try:
|
||||
subprocess.check_call(args, cwd=cwd)
|
||||
subprocess.check_call(args)
|
||||
print GREEN + "started" + NORMAL
|
||||
except subprocess.CalledProcessError as e:
|
||||
print (
|
||||
|
|
|
@ -155,6 +155,7 @@ class RoomCreationHandler(BaseHandler):
|
|||
preset_config=preset_config,
|
||||
invite_list=invite_list,
|
||||
initial_state=initial_state,
|
||||
room_alias=room_alias,
|
||||
)
|
||||
|
||||
msg_handler = self.hs.get_handlers().message_handler
|
||||
|
@ -202,7 +203,7 @@ class RoomCreationHandler(BaseHandler):
|
|||
defer.returnValue(result)
|
||||
|
||||
def _create_events_for_new_room(self, creator, room_id, preset_config,
|
||||
invite_list, initial_state):
|
||||
invite_list, initial_state, room_alias):
|
||||
config = RoomCreationHandler.PRESETS_DICT[preset_config]
|
||||
|
||||
creator_id = creator.to_string()
|
||||
|
@ -271,6 +272,14 @@ class RoomCreationHandler(BaseHandler):
|
|||
|
||||
returned_events.append(power_levels_event)
|
||||
|
||||
if room_alias and (EventTypes.CanonicalAlias, '') not in initial_state:
|
||||
room_alias_event = create(
|
||||
etype=EventTypes.CanonicalAlias,
|
||||
content={"alias": room_alias.to_string()},
|
||||
)
|
||||
|
||||
returned_events.append(room_alias_event)
|
||||
|
||||
if (EventTypes.JoinRules, '') not in initial_state:
|
||||
join_rules_event = create(
|
||||
etype=EventTypes.JoinRules,
|
||||
|
|
Loading…
Reference in a new issue