mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:56:05 -04:00
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/add_rate_limiting_to_joins
This commit is contained in:
commit
faba873d4b
121 changed files with 1937 additions and 1256 deletions
|
@ -642,14 +642,8 @@ class DeferredMockCallable(object):
|
|||
)
|
||||
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def create_room(hs, room_id, creator_id):
|
||||
async def create_room(hs, room_id: str, creator_id: str):
|
||||
"""Creates and persist a creation event for the given room
|
||||
|
||||
Args:
|
||||
hs
|
||||
room_id (str)
|
||||
creator_id (str)
|
||||
"""
|
||||
|
||||
persistence_store = hs.get_storage().persistence
|
||||
|
@ -657,7 +651,7 @@ def create_room(hs, room_id, creator_id):
|
|||
event_builder_factory = hs.get_event_builder_factory()
|
||||
event_creation_handler = hs.get_event_creation_handler()
|
||||
|
||||
yield store.store_room(
|
||||
await store.store_room(
|
||||
room_id=room_id,
|
||||
room_creator_user_id=creator_id,
|
||||
is_public=False,
|
||||
|
@ -675,8 +669,6 @@ def create_room(hs, room_id, creator_id):
|
|||
},
|
||||
)
|
||||
|
||||
event, context = yield defer.ensureDeferred(
|
||||
event_creation_handler.create_new_client_event(builder)
|
||||
)
|
||||
event, context = await event_creation_handler.create_new_client_event(builder)
|
||||
|
||||
yield persistence_store.persist_event(event, context)
|
||||
await persistence_store.persist_event(event, context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue