Merge pull request #1678 from matrix-org/rav/fix_receipt_notifications
Read-receipt fixespull/1683/head
commit
da13b4aa86
|
@ -100,7 +100,7 @@ class ReceiptsHandler(BaseHandler):
|
||||||
|
|
||||||
if not res:
|
if not res:
|
||||||
# res will be None if this read receipt is 'old'
|
# res will be None if this read receipt is 'old'
|
||||||
defer.returnValue(False)
|
continue
|
||||||
|
|
||||||
stream_id, max_persisted_id = res
|
stream_id, max_persisted_id = res
|
||||||
|
|
||||||
|
@ -109,6 +109,10 @@ class ReceiptsHandler(BaseHandler):
|
||||||
if max_batch_id is None or max_persisted_id > max_batch_id:
|
if max_batch_id is None or max_persisted_id > max_batch_id:
|
||||||
max_batch_id = max_persisted_id
|
max_batch_id = max_persisted_id
|
||||||
|
|
||||||
|
if min_batch_id is None:
|
||||||
|
# no new receipts
|
||||||
|
defer.returnValue(False)
|
||||||
|
|
||||||
affected_room_ids = list(set([r["room_id"] for r in receipts]))
|
affected_room_ids = list(set([r["room_id"] for r in receipts]))
|
||||||
|
|
||||||
with PreserveLoggingContext():
|
with PreserveLoggingContext():
|
||||||
|
|
|
@ -405,7 +405,7 @@ class ReceiptsStore(SQLBaseStore):
|
||||||
room_id, receipt_type, user_id, event_ids, data
|
room_id, receipt_type, user_id, event_ids, data
|
||||||
)
|
)
|
||||||
|
|
||||||
max_persisted_id = self._stream_id_gen.get_current_token()
|
max_persisted_id = self._receipts_id_gen.get_current_token()
|
||||||
|
|
||||||
defer.returnValue((stream_id, max_persisted_id))
|
defer.returnValue((stream_id, max_persisted_id))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue