mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 18:34:56 -04:00
Various clean ups to room stream tokens. (#8423)
This commit is contained in:
parent
8238b55e08
commit
ea70f1c362
16 changed files with 96 additions and 76 deletions
|
@ -163,7 +163,7 @@ class _NotifierUserStream:
|
|||
"""
|
||||
# Immediately wake up stream if something has already since happened
|
||||
# since their last token.
|
||||
if self.last_notified_token.is_after(token):
|
||||
if self.last_notified_token != token:
|
||||
return _NotificationListener(defer.succeed(self.current_token))
|
||||
else:
|
||||
return _NotificationListener(self.notify_deferred.observe())
|
||||
|
@ -470,7 +470,7 @@ class Notifier:
|
|||
async def check_for_updates(
|
||||
before_token: StreamToken, after_token: StreamToken
|
||||
) -> EventStreamResult:
|
||||
if not after_token.is_after(before_token):
|
||||
if after_token == before_token:
|
||||
return EventStreamResult([], (from_token, from_token))
|
||||
|
||||
events = [] # type: List[EventBase]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue