diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-05-07 15:00:02 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-05-07 15:00:02 +0100 |
commit | fac30c05548f9dea3fee1f406ee65e209fb00698 (patch) | |
tree | 9ab716624401db41244391224204f4b4c0927ea8 | |
parent | Convert get_users_who_share_room_with_user to async/await (diff) | |
download | synapse-fac30c05548f9dea3fee1f406ee65e209fb00698.tar.xz |
Don't async too many things
-rw-r--r-- | synapse/storage/data_stores/main/roommember.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/data_stores/main/roommember.py b/synapse/storage/data_stores/main/roommember.py index fde6399f53..93411407f0 100644 --- a/synapse/storage/data_stores/main/roommember.py +++ b/synapse/storage/data_stores/main/roommember.py @@ -474,13 +474,14 @@ class RoomMemberWorkerStore(EventsWorkerStore): _get_users_server_still_shares_room_with_txn, ) - async def get_rooms_for_user(self, user_id, on_invalidate=None): + @defer.inlineCallbacks + def get_rooms_for_user(self, user_id, on_invalidate=None): """Returns a set of room_ids the user is currently joined to. If a remote user only returns rooms this server is currently participating in. """ - rooms = await self.get_rooms_for_user_with_stream_ordering( + rooms = yield self.get_rooms_for_user_with_stream_ordering( user_id, on_invalidate=on_invalidate ) return frozenset(r.room_id for r in rooms) |