summary refs log tree commit diff
diff options
context:
space:
mode:
authorJorik Schellekens <joriks@matrix.org>2019-08-05 14:26:30 +0100
committerJorik Schellekens <joriks@matrix.org>2019-08-05 14:26:30 +0100
commit6a355ca20ab6d11f205eeb5b45b7d3c9f9d198d3 (patch)
tree979187527f10279f64eab29af87da00e863373d8
parentDebug comments gone rampant. (diff)
downloadsynapse-6a355ca20ab6d11f205eeb5b45b7d3c9f9d198d3.tar.xz
Refactor for clarity.
-rw-r--r--synapse/storage/devices.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index 0f00d9a4c5..046c000c40 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -140,10 +140,10 @@ class DeviceWorkerStore(SQLBaseStore):
                 break
 
             key = (update[0], update[1])
-            query_map[key] = (
-                max(query_map.get(key, (0, None))[0], update[2]),
-                update[3],
-            )
+            context = update[3]
+            stream_id = max(query_map.get(key, (0, None))[0], update[2])
+
+            query_map[key] = (stream_id, context)
 
         # If we didn't find any updates with a stream_id lower than the cutoff, it
         # means that there are more than limit updates all of which have the same