Skip to content

Commit

Permalink
Fix to-device messages not being sent to MSC3202-enabled appservices (m…
Browse files Browse the repository at this point in the history
…atrix-org#13235)

The field name was simply incorrect, leading to errors.
  • Loading branch information
turt2live authored Jul 11, 2022
1 parent f1711e1 commit d736d5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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 @@ -331,8 +331,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

0 comments on commit d736d5c

Please sign in to comment.