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

Commit 026cb8a

Browse files
committed
Don't query for to-device messages without a device
1 parent 25488fa commit 026cb8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

synapse/handlers/sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ async def _generate_sync_entry_for_to_device(
13351335
if sync_result_builder.since_token is not None:
13361336
since_stream_id = int(sync_result_builder.since_token.to_device_key)
13371337

1338-
if since_stream_id != int(now_token.to_device_key):
1338+
if device_id is not None and since_stream_id != int(now_token.to_device_key):
13391339
messages, stream_id = await self.store.get_messages_for_device(
13401340
user_id, device_id, since_stream_id, now_token.to_device_key
13411341
)

0 commit comments

Comments
 (0)