diff options
author | Erik Johnston <erikj@matrix.org> | 2023-10-04 18:28:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 16:28:40 +0100 |
commit | 80ec81dcc54bdb823b95c2f870a919868de9a481 (patch) | |
tree | 4890f3c4fc0b95fd8b91e2d1f7b30b8e228e7b36 /synapse/push/pusherpool.py | |
parent | Update changelog (diff) | |
download | synapse-80ec81dcc54bdb823b95c2f870a919868de9a481.tar.xz |
Some refactors around receipts stream (#16426)
Diffstat (limited to 'synapse/push/pusherpool.py')
-rw-r--r-- | synapse/push/pusherpool.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py index 6517e3566f..15a2cc932f 100644 --- a/synapse/push/pusherpool.py +++ b/synapse/push/pusherpool.py @@ -292,20 +292,12 @@ class PusherPool: except Exception: logger.exception("Exception in pusher on_new_notifications") - async def on_new_receipts( - self, min_stream_id: int, max_stream_id: int, affected_room_ids: Iterable[str] - ) -> None: + async def on_new_receipts(self, users_affected: StrCollection) -> None: if not self.pushers: # nothing to do here. return try: - # Need to subtract 1 from the minimum because the lower bound here - # is not inclusive - users_affected = await self.store.get_users_sent_receipts_between( - min_stream_id - 1, max_stream_id - ) - for u in users_affected: # Don't push if the user account has expired expired = await self._account_validity_handler.is_user_expired(u) @@ -314,7 +306,7 @@ class PusherPool: if u in self.pushers: for p in self.pushers[u].values(): - p.on_new_receipts(min_stream_id, max_stream_id) + p.on_new_receipts() except Exception: logger.exception("Exception in pusher on_new_receipts") |