summary refs log tree commit diff
path: root/synapse/handlers/device.py
diff options
context:
space:
mode:
authorOlivier 'reivilibre <oliverw@matrix.org>2024-07-30 18:07:35 +0100
committerOlivier 'reivilibre <oliverw@matrix.org>2024-07-30 18:07:35 +0100
commited583d9c815520f94a7267e7ef0dbb7977e57189 (patch)
tree123e3d6a8ffa77a12f7bf219fb63c8b801b0f5e9 /synapse/handlers/device.py
parentAdd bold emphasis to some parts of the changelog (diff)
parent1.112.0 (diff)
downloadsynapse-ed583d9c815520f94a7267e7ef0dbb7977e57189.tar.xz
Merge branch 'release-v1.112' github/master master
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r--synapse/handlers/device.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py
index 0432d97109..4fc6fcd7ae 100644
--- a/synapse/handlers/device.py
+++ b/synapse/handlers/device.py
@@ -39,6 +39,7 @@ from synapse.metrics.background_process_metrics import (
 )
 from synapse.storage.databases.main.client_ips import DeviceLastConnectionInfo
 from synapse.types import (
+    DeviceListUpdates,
     JsonDict,
     JsonMapping,
     ScheduledTask,
@@ -214,7 +215,7 @@ class DeviceWorkerHandler:
     @cancellable
     async def get_user_ids_changed(
         self, user_id: str, from_token: StreamToken
-    ) -> JsonDict:
+    ) -> DeviceListUpdates:
         """Get list of users that have had the devices updated, or have newly
         joined a room, that `user_id` may be interested in.
         """
@@ -341,11 +342,19 @@ class DeviceWorkerHandler:
             possibly_joined = set()
             possibly_left = set()
 
-        result = {"changed": list(possibly_joined), "left": list(possibly_left)}
+        device_list_updates = DeviceListUpdates(
+            changed=possibly_joined,
+            left=possibly_left,
+        )
 
-        log_kv(result)
+        log_kv(
+            {
+                "changed": device_list_updates.changed,
+                "left": device_list_updates.left,
+            }
+        )
 
-        return result
+        return device_list_updates
 
     async def on_federation_query_user_devices(self, user_id: str) -> JsonDict:
         if not self.hs.is_mine(UserID.from_string(user_id)):