summary refs log tree commit diff
diff options
context:
space:
mode:
authorTravis Ralston <travisr@matrix.org>2022-07-11 10:22:17 -0600
committerGitHub <noreply@github.com>2022-07-11 17:22:17 +0100
commitd736d5cfadcc9a56523fcb1cfe8cb1d2be47a4ec (patch)
treee74b4ca13e6b65566bc8df01580309472c71c55a
parentRemove delay when rotating event push actions (#13211) (diff)
downloadsynapse-d736d5cfadcc9a56523fcb1cfe8cb1d2be47a4ec.tar.xz
Fix to-device messages not being sent to MSC3202-enabled appservices (#13235)
The field name was simply incorrect, leading to errors.
-rw-r--r--changelog.d/13235.bugfix1
-rw-r--r--synapse/appservice/scheduler.py5
2 files changed, 4 insertions, 2 deletions
diff --git a/changelog.d/13235.bugfix b/changelog.d/13235.bugfix
new file mode 100644
index 0000000000..5c31fbc775
--- /dev/null
+++ b/changelog.d/13235.bugfix
@@ -0,0 +1 @@
+Fix MSC3202-enabled appservices not receiving to-device messages, preventing messages from being decrypted.
\ No newline at end of file
diff --git a/synapse/appservice/scheduler.py b/synapse/appservice/scheduler.py
index 6c8695346f..430ffbcd1f 100644
--- a/synapse/appservice/scheduler.py
+++ b/synapse/appservice/scheduler.py
@@ -331,8 +331,9 @@ class _ServiceQueuer:
             )
 
         # Add recipients of to-device messages.
-        # device_message["user_id"] is the ID of the recipient.
-        users.update(device_message["user_id"] for device_message in to_device_messages)
+        users.update(
+            device_message["to_user_id"] for device_message in to_device_messages
+        )
 
         # Compute and return the counts / fallback key usage states
         otk_counts = await self._store.count_bulk_e2e_one_time_keys_for_as(users)