summary refs log tree commit diff
path: root/synapse/storage/devices.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/devices.py')
-rw-r--r--synapse/storage/devices.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index 2b2cebacfa..89c7bc0cc0 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -486,6 +486,8 @@ class DeviceStore(SQLBaseStore):
         defer.returnValue(stream_id)
 
     def _add_device_change_txn(self, txn, user_id, device_ids, hosts, stream_id):
+        now = self._clock.time_msec()
+
         txn.call_after(
             self._device_list_stream_cache.entity_has_changed,
             user_id, stream_id,
@@ -519,6 +521,7 @@ class DeviceStore(SQLBaseStore):
                     "user_id": user_id,
                     "device_id": device_id,
                     "sent": False,
+                    "ts": now,
                 }
                 for destination in hosts
                 for device_id in device_ids