summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/message.py6
-rw-r--r--synapse/handlers/room_member.py4
-rw-r--r--synapse/storage/data_stores/main/event_federation.py5
3 files changed, 10 insertions, 5 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 4ad752205f..2695975a16 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -740,7 +740,7 @@ class EventCreationHandler(object):
                 % (len(prev_events_and_hashes),)
             )
         else:
-            prev_events_and_hashes = yield self.store.get_prev_events_for_room(
+            prev_events_and_hashes = yield self.store.get_prev_events_and_hashes_for_room(
                 builder.room_id
             )
 
@@ -1042,7 +1042,9 @@ class EventCreationHandler(object):
             # For each room we need to find a joined member we can use to send
             # the dummy event with.
 
-            prev_events_and_hashes = yield self.store.get_prev_events_for_room(room_id)
+            prev_events_and_hashes = yield self.store.get_prev_events_and_hashes_for_room(
+                room_id
+            )
 
             latest_event_ids = (event_id for (event_id, _, _) in prev_events_and_hashes)
 
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index 44c5e3239c..91bb34cd55 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -370,7 +370,9 @@ class RoomMemberHandler(object):
             if block_invite:
                 raise SynapseError(403, "Invites have been disabled on this server")
 
-        prev_events_and_hashes = yield self.store.get_prev_events_for_room(room_id)
+        prev_events_and_hashes = yield self.store.get_prev_events_and_hashes_for_room(
+            room_id
+        )
         latest_event_ids = (event_id for (event_id, _, _) in prev_events_and_hashes)
 
         current_state_ids = yield self.state_handler.get_current_state_ids(
diff --git a/synapse/storage/data_stores/main/event_federation.py b/synapse/storage/data_stores/main/event_federation.py
index 1f517e8fad..266fc9715f 100644
--- a/synapse/storage/data_stores/main/event_federation.py
+++ b/synapse/storage/data_stores/main/event_federation.py
@@ -149,9 +149,10 @@ class EventFederationWorkerStore(EventsWorkerStore, SignatureWorkerStore, SQLBas
         )
 
     @defer.inlineCallbacks
-    def get_prev_events_for_room(self, room_id):
+    def get_prev_events_and_hashes_for_room(self, room_id):
         """
-        Gets a subset of the current forward extremities in the given room.
+        Gets a subset of the current forward extremities in the given room,
+        along with their depths and hashes.
 
         Limits the result to 10 extremities, so that we can avoid creating
         events which refer to hundreds of prev_events.