diff options
author | Erik Johnston <erik@matrix.org> | 2024-07-18 12:00:48 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2024-07-18 12:00:48 +0100 |
commit | 560087bf87f501145858b52e11b2dd4d6a555a53 (patch) | |
tree | 20b3ace24c16a5fd0c292130878286c6498c375e /synapse/handlers/sliding_sync.py | |
parent | Add docstring (diff) | |
download | synapse-560087bf87f501145858b52e11b2dd4d6a555a53.tar.xz |
Remove '_token' prefix
Diffstat (limited to 'synapse/handlers/sliding_sync.py')
-rw-r--r-- | synapse/handlers/sliding_sync.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index 3aa139ff1c..80ca3fa587 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -379,7 +379,7 @@ class SlidingSyncHandler: # this returns false, it means we timed out waiting, and we should # just return an empty response. before_wait_ts = self.clock.time_msec() - if not await self.notifier.wait_for_stream_token(from_token.stream_token): + if not await self.notifier.wait_for_stream_token(from_token.stream): logger.warning( "Timed out waiting for worker to catch up. Returning empty response" ) @@ -417,7 +417,7 @@ class SlidingSyncHandler: sync_config.user.to_string(), timeout_ms, current_sync_callback, - from_token=from_token.stream_token, + from_token=from_token.stream, ) return result @@ -459,7 +459,7 @@ class SlidingSyncHandler: await self.get_room_membership_for_user_at_to_token( user=sync_config.user, to_token=to_token, - from_token=from_token.stream_token if from_token else None, + from_token=from_token.stream if from_token else None, ) ) @@ -1414,7 +1414,7 @@ class SlidingSyncHandler: # - TODO: For an incremental sync where we haven't sent it down this # connection before to_bound = ( - from_token.stream_token.room_key + from_token.stream.room_key if from_token is not None and not room_membership_for_user_at_to_token.newly_joined else None @@ -1481,9 +1481,7 @@ class SlidingSyncHandler: instance_name=timeline_event.internal_metadata.instance_name, stream=timeline_event.internal_metadata.stream_ordering, ) - if persisted_position.persisted_after( - from_token.stream_token.room_key - ): + if persisted_position.persisted_after(from_token.stream.room_key): num_live += 1 else: # Since we're iterating over the timeline events in |