diff options
author | Eric Eastwood <eric.eastwood@beta.gouv.fr> | 2024-06-04 12:58:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-04 12:58:03 -0500 |
commit | 7d8f0ef351e99adf602b3acb67b2516a02ff6918 (patch) | |
tree | f8fdbcd3578d0866a236e589062b80360f549a3b /synapse/handlers/admin.py | |
parent | Merge branch 'release-v1.109' into develop (diff) | |
download | synapse-7d8f0ef351e99adf602b3acb67b2516a02ff6918.tar.xz |
Use fully-qualified `PersistedEventPosition` when returning `RoomsForUser` (#17265)
Use fully-qualified `PersistedEventPosition` (`instance_name` and `stream_ordering`) when returning `RoomsForUser` to facilitate proper comparisons and `RoomStreamToken` generation. Spawning from https://github.com/element-hq/synapse/pull/17187 where we want to utilize this change
Diffstat (limited to 'synapse/handlers/admin.py')
-rw-r--r-- | synapse/handlers/admin.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py index 702d40332c..21d3bb37f3 100644 --- a/synapse/handlers/admin.py +++ b/synapse/handlers/admin.py @@ -126,13 +126,7 @@ class AdminHandler: # Get all rooms the user is in or has been in rooms = await self._store.get_rooms_for_local_user_where_membership_is( user_id, - membership_list=( - Membership.JOIN, - Membership.LEAVE, - Membership.BAN, - Membership.INVITE, - Membership.KNOCK, - ), + membership_list=Membership.LIST, ) # We only try and fetch events for rooms the user has been in. If @@ -179,7 +173,7 @@ class AdminHandler: if room.membership == Membership.JOIN: stream_ordering = self._store.get_room_max_stream_ordering() else: - stream_ordering = room.stream_ordering + stream_ordering = room.event_pos.stream from_key = RoomStreamToken(topological=0, stream=0) to_key = RoomStreamToken(stream=stream_ordering) |