mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 12:43:50 +01:00
More bug fixes
This commit is contained in:
parent
a295a3c691
commit
e8323b9e34
2 changed files with 7 additions and 3 deletions
|
@ -70,7 +70,11 @@ class BaseHandler(object):
|
|||
builder.room_id,
|
||||
)
|
||||
|
||||
depth = max([d for _, _, d in latest_ret])
|
||||
if latest_ret:
|
||||
depth = max([d for _, _, d in latest_ret])
|
||||
else:
|
||||
depth = 1
|
||||
|
||||
prev_events = [(e, h) for e, h, _ in latest_ret]
|
||||
|
||||
builder.prev_events = prev_events
|
||||
|
|
|
@ -173,13 +173,14 @@ class RoomCreationHandler(BaseHandler):
|
|||
"sender": creator_id,
|
||||
}
|
||||
|
||||
def create(etype, content):
|
||||
def create(etype, content, **kwargs):
|
||||
e = {
|
||||
"type": etype,
|
||||
"content": content,
|
||||
}
|
||||
|
||||
e.update(event_keys)
|
||||
e.update(kwargs)
|
||||
|
||||
return e
|
||||
|
||||
|
@ -194,7 +195,6 @@ class RoomCreationHandler(BaseHandler):
|
|||
content={
|
||||
"membership": Membership.JOIN,
|
||||
},
|
||||
**event_keys
|
||||
)
|
||||
|
||||
power_levels_event = create(
|
||||
|
|
Loading…
Reference in a new issue