diff options
-rw-r--r-- | synapse/handlers/appservice.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index 6cad82f542..313d539e45 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -182,7 +182,7 @@ class ApplicationServicesHandler: def notify_interested_services_ephemeral( self, stream_key: str, - new_token: int, + new_token: Union[int, RoomStreamToken], users: Optional[Collection[Union[str, UserID]]] = None, ) -> None: """ @@ -212,6 +212,13 @@ class ApplicationServicesHandler: if stream_key not in ("typing_key", "receipt_key", "presence_key"): return + # Convert new_token from a RoomStreamToken to an int if necessary. + # We just use the minimum stream ordering and ignore the vector clock + # component. This is safe to do as long as we *always* ignore the vector + # clock components. + if isinstance(new_token, RoomStreamToken): + new_token = new_token.stream + services = [ service for service in self.store.get_app_services() |