diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py index 046c000c40..3b2e9c6699 100644 --- a/synapse/storage/devices.py +++ b/synapse/storage/devices.py @@ -194,8 +194,8 @@ class DeviceWorkerStore(SQLBaseStore): Args: destination (str): The host the device updates are intended for from_stream_id (int): The minimum stream_id to filter updates by, exclusive - query_map (Dict[(str, str): int]): Dictionary mapping - user_id/device_id to update stream_id + query_map (Dict[(str, str): (int, str)]): Dictionary mapping + user_id/device_id to update stream_id and the relevent opentracing context Returns: List[Dict]: List of objects representing an device update EDU @@ -217,7 +217,7 @@ class DeviceWorkerStore(SQLBaseStore): destination, user_id, from_stream_id ) for device_id, device in iteritems(user_devices): - stream_id = query_map[(user_id, device_id)][0] + stream_id, _ = query_map[(user_id, device_id)] result = { "user_id": user_id, "device_id": device_id,