summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-12-08 12:13:01 +0000
committerRichard van der Hoff <richard@matrix.org>2016-12-08 12:13:01 +0000
commitb08f76bd23f4eb9b13ebefd57ee00a7b4803beee (patch)
tree252fbf11b25a154cbb5e7cf5e544746b03986dc6 /synapse/handlers
parentFix result of insert_receipt (diff)
downloadsynapse-b08f76bd23f4eb9b13ebefd57ee00a7b4803beee.tar.xz
Fix ignored read-receipts
Don't ignore read-receipts which arrive in the same EDU as a read-receipt for
an old event.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/receipts.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/receipts.py b/synapse/handlers/receipts.py
index 916e80a48e..50aa513935 100644
--- a/synapse/handlers/receipts.py
+++ b/synapse/handlers/receipts.py
@@ -100,7 +100,7 @@ class ReceiptsHandler(BaseHandler):
 
             if not res:
                 # res will be None if this read receipt is 'old'
-                defer.returnValue(False)
+                continue
 
             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:
                 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]))
 
         with PreserveLoggingContext():