Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit eff722d

Browse files
bradtgmurrayFizzadar
authored andcommitted
hacky upper bounding work
1 parent e75c7e3 commit eff722d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

synapse/handlers/appservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ async def _handle_receipts(
447447

448448
receipts_source = self.event_sources.sources.receipt
449449
receipts, _ = await receipts_source.get_new_events_as(
450-
service=service, from_key=from_key
450+
service=service, from_key=from_key, to_key=new_token
451451
)
452452
return receipts
453453

synapse/handlers/receipts.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ async def get_new_events(
239239
return events, to_key
240240

241241
async def get_new_events_as(
242-
self, from_key: int, service: ApplicationService
242+
self, from_key: int, to_key: int, service: ApplicationService
243243
) -> Tuple[List[JsonDict], int]:
244244
"""Returns a set of new read receipt events that an appservice
245245
may be interested in.
@@ -255,7 +255,6 @@ async def get_new_events_as(
255255
* The current read receipt stream token.
256256
"""
257257
from_key = int(from_key)
258-
to_key = self.get_current_key()
259258

260259
if from_key == to_key:
261260
return [], to_key

0 commit comments

Comments
 (0)