summary refs log tree commit diff
path: root/synapse/push/emailpusher.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-10-30 23:55:43 +1100
committerGitHub <noreply@github.com>2018-10-30 23:55:43 +1100
commit0dce9e1379ea867c9a00c8e6cf1d42badb52601d (patch)
tree941dcf4454a602715d8c2d6728242c8f677a7fce /synapse/push/emailpusher.py
parentMerge pull request #4109 from matrix-org/erikj/repl_devices (diff)
downloadsynapse-0dce9e1379ea867c9a00c8e6cf1d42badb52601d.tar.xz
Write some tests for the email pusher (#4095)
Diffstat (limited to 'synapse/push/emailpusher.py')
-rw-r--r--synapse/push/emailpusher.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/push/emailpusher.py b/synapse/push/emailpusher.py
index f369124258..50e1007d84 100644
--- a/synapse/push/emailpusher.py
+++ b/synapse/push/emailpusher.py
@@ -85,7 +85,10 @@ class EmailPusher(object):
             self.timed_call = None
 
     def on_new_notifications(self, min_stream_ordering, max_stream_ordering):
-        self.max_stream_ordering = max(max_stream_ordering, self.max_stream_ordering)
+        if self.max_stream_ordering:
+            self.max_stream_ordering = max(max_stream_ordering, self.max_stream_ordering)
+        else:
+            self.max_stream_ordering = max_stream_ordering
         self._start_processing()
 
     def on_new_receipts(self, min_stream_id, max_stream_id):