This commit is contained in:
Erik Johnston 2024-06-19 15:26:03 +01:00
parent bc42a73e99
commit 590624fc98

View file

@ -433,8 +433,11 @@ class FederationSenderHandler:
# The entities are either user IDs (starting with '@') whose devices
# have changed, or remote servers that we need to tell about
# changes.
hosts = await self.store.get_destinations_for_device(token)
await self.federation_sender.send_device_messages(hosts, immediate=False)
if any(row.hosts_calcualted for row in rows):
hosts = await self.store.get_destinations_for_device(token)
await self.federation_sender.send_device_messages(
hosts, immediate=False
)
elif stream_name == ToDeviceStream.NAME:
# The to_device stream includes stuff to be pushed to both local