summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-11 10:37:43 +0100
committerErik Johnston <erik@matrix.org>2019-06-11 10:37:43 +0100
commit5bc94845378aa0e8dea9bc325ac2c57aaa540ce6 (patch)
tree6bf0bb46d390ca3185fe8491ff0470d3223ab6ba /synapse/storage
parentDon't warn user about password reset disabling through config code (#5387) (diff)
parent1.0.0rc3 (diff)
downloadsynapse-5bc94845378aa0e8dea9bc325ac2c57aaa540ce6.tar.xz
Merge branch 'release-v1.0.0' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/deviceinbox.py4
-rw-r--r--synapse/storage/registration.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/synapse/storage/deviceinbox.py b/synapse/storage/deviceinbox.py
index 9b0a99cb49..4ea0deea4f 100644
--- a/synapse/storage/deviceinbox.py
+++ b/synapse/storage/deviceinbox.py
@@ -138,6 +138,10 @@ class DeviceInboxWorkerStore(SQLBaseStore):
         if not has_changed or last_stream_id == current_stream_id:
             return defer.succeed(([], current_stream_id))
 
+        if limit <= 0:
+            # This can happen if we run out of room for EDUs in the transaction.
+            return defer.succeed(([], last_stream_id))
+
         def get_new_messages_for_remote_destination_txn(txn):
             sql = (
                 "SELECT stream_id, messages_json FROM device_federation_outbox"
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index 9b41cbd757..1dd1182e82 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -998,7 +998,7 @@ class RegistrationStore(
         client_secret,
         address=None,
         sid=None,
-        validated=None,
+        validated=True,
     ):
         """Gets a session_id and last_send_attempt (if available) for a
         client_secret/medium/(address|session_id) combo