Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix to-device messages not being sent to MSC3202-enabled appservices #13235

Merged
merged 4 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13235.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix MSC3202-enabled appservices not receiving to-device messages, preventing messages from being decrypted.
5 changes: 3 additions & 2 deletions synapse/appservice/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,9 @@ async def _compute_msc3202_otk_counts_and_fallback_keys(
)

# 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)
Expand Down