summary refs log tree commit diff
path: root/synapse/handlers/room_member.py
diff options
context:
space:
mode:
authorShay <hillerys@element.io>2022-09-28 03:11:48 -0700
committerGitHub <noreply@github.com>2022-09-28 10:11:48 +0000
commit8ab16a92edd675453c78cfd9974081e374b0f998 (patch)
tree57cb2dae52dbb6e3e09a18e1fb7e6038afcc4d20 /synapse/handlers/room_member.py
parentPrepatory work for batching events to send (#13487) (diff)
downloadsynapse-8ab16a92edd675453c78cfd9974081e374b0f998.tar.xz
Persist CreateRoom events to DB in a batch (#13800)
Diffstat (limited to 'synapse/handlers/room_member.py')
-rw-r--r--synapse/handlers/room_member.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index 8d01f4bf2b..88158822e0 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -432,8 +432,7 @@ class RoomMemberHandler(metaclass=abc.ABCMeta):
         with opentracing.start_active_span("handle_new_client_event"):
             result_event = await self.event_creation_handler.handle_new_client_event(
                 requester,
-                event,
-                context,
+                events_and_context=[(event, context)],
                 extra_users=[target],
                 ratelimit=ratelimit,
             )
@@ -1252,7 +1251,10 @@ class RoomMemberHandler(metaclass=abc.ABCMeta):
                 raise SynapseError(403, "This room has been blocked on this server")
 
         event = await self.event_creation_handler.handle_new_client_event(
-            requester, event, context, extra_users=[target_user], ratelimit=ratelimit
+            requester,
+            events_and_context=[(event, context)],
+            extra_users=[target_user],
+            ratelimit=ratelimit,
         )
 
         prev_member_event_id = prev_state_ids.get(
@@ -1860,8 +1862,7 @@ class RoomMemberMasterHandler(RoomMemberHandler):
 
         result_event = await self.event_creation_handler.handle_new_client_event(
             requester,
-            event,
-            context,
+            events_and_context=[(event, context)],
             extra_users=[UserID.from_string(target_user)],
         )
         # we know it was persisted, so must have a stream ordering