summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-10-13 14:08:38 +0100
committerMark Haines <mark.haines@matrix.org>2015-10-13 14:08:38 +0100
commitcacf0688c691517dab55c3cff294b6bac7f0d6e3 (patch)
tree62e8683d57e5d1f66824d1aa5eba3f9a0862f3dd /synapse/handlers
parentInclude invites in incremental sync (diff)
downloadsynapse-cacf0688c691517dab55c3cff294b6bac7f0d6e3.tar.xz
Add a get_invites_for_user method to the storage to find out the rooms a user is invited to
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/sync.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index d9e55d8a58..380798b7ab 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -297,12 +297,8 @@ class SyncHandler(BaseHandler):
                 if room_sync:
                     joined.append(room_sync)
         else:
-            invites = yield self.store.get_rooms_for_user_where_membership_is(
-                user_id=sync_config.user.to_string(),
-                membership_list=[Membership.INVITE],
-            )
-            invite_events = yield self.store.get_events(
-                [invite.event_id for invite in invites]
+            invite_events = yield self.store.get_invites_for_user(
+                sync_config.user.to_string()
             )
 
             for room_id in joined_room_ids: