summary refs log tree commit diff
path: root/synapse/storage/receipts.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-04-07 15:39:53 +0100
committerDavid Baker <dave@matrix.org>2016-04-07 15:39:53 +0100
commit92e3071623c34350bf072bb77e089d5d6d5f41c2 (patch)
treecfed2957e7294260313c7c1997dd54f852402772 /synapse/storage/receipts.py
parentpep8 (diff)
downloadsynapse-92e3071623c34350bf072bb77e089d5d6d5f41c2.tar.xz
Send badge count pushes.
Also fix bugs with retrying.
Diffstat (limited to '')
-rw-r--r--synapse/storage/receipts.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/storage/receipts.py b/synapse/storage/receipts.py
index 4befebc8e2..59d1ac0314 100644
--- a/synapse/storage/receipts.py
+++ b/synapse/storage/receipts.py
@@ -390,16 +390,19 @@ class ReceiptsStore(SQLBaseStore):
             }
         )
 
-    def get_all_updated_receipts(self, last_id, current_id, limit):
+    def get_all_updated_receipts(self, last_id, current_id, limit=None):
         def get_all_updated_receipts_txn(txn):
             sql = (
                 "SELECT stream_id, room_id, receipt_type, user_id, event_id, data"
                 " FROM receipts_linearized"
                 " WHERE ? < stream_id AND stream_id <= ?"
                 " ORDER BY stream_id ASC"
-                " LIMIT ?"
             )
-            txn.execute(sql, (last_id, current_id, limit))
+            args = [last_id, current_id]
+            if limit is not None:
+                sql += " LIMIT ?"
+                args.append(limit)
+            txn.execute(sql, args)
 
             return txn.fetchall()
         return self.runInteraction(