summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-03 17:26:56 +0100
committerErik Johnston <erik@matrix.org>2019-10-03 17:26:56 +0100
commita9610cdf02e04ecd8df52ebe74b1cb1338a5be97 (patch)
treea122015d5ba6a75e17e818af8e7a72040f64c438 /synapse/storage
parentcachedList descriptor doesn't like typing (diff)
downloadsynapse-a9610cdf02e04ecd8df52ebe74b1cb1338a5be97.tar.xz
Fixup names and comments
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/roommember.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index ef6179cbe5..37c0723eb6 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -568,7 +568,7 @@ class RoomMemberWorkerStore(EventsWorkerStore):
                 missing_member_event_ids.append(event_id)
 
         if missing_member_event_ids:
-            event_to_memberships = yield self._get_membership_from_event_ids(
+            event_to_memberships = yield self._get_joined_profiles_from_event_ids(
                 missing_member_event_ids
             )
             users_in_room.update((row for row in event_to_memberships.values() if row))
@@ -584,23 +584,24 @@ class RoomMemberWorkerStore(EventsWorkerStore):
         return users_in_room
 
     @cached(max_entries=10000)
-    def _get_membership_from_event_id(self, event_id):
+    def _get_joined_profile_from_event_id(self, event_id):
         raise NotADirectoryError()
 
     @cachedList(
-        cached_method_name="_get_membership_from_event_id",
+        cached_method_name="_get_joined_profile_from_event_id",
         list_name="event_ids",
         inlineCallbacks=True,
     )
-    def _get_membership_from_event_ids(self, event_ids):
-        """Lookup profile info for set of member event IDs.
+    def _get_joined_profiles_from_event_ids(self, event_ids):
+        """For given set of member event_ids check if they point to a join
+        event and if so return the associated user and profile info.
 
         Args:
             event_ids (Iterable[str]): The member event IDs to lookup
 
         Returns:
             Deferred[dict[str, Tuple[str, ProfileInfo]|None]]: Map from event ID
-            to `user_id` and ProfileInfo (or None if couldn't find event).
+            to `user_id` and ProfileInfo (or None if not join event).
         """
 
         rows = yield self._simple_select_many_batch(