From 72f3f23c4db3f549a1aa060a7e98ba07812e570b Mon Sep 17 00:00:00 2001 From: Shay Date: Tue, 21 Mar 2023 17:59:55 -0700 Subject: [PATCH] Change the parameter `immediate` of `send_device_messages` to default to `True` (#15297) --- changelog.d/15297.bugfix | 1 + synapse/federation/send_queue.py | 2 +- synapse/federation/sender/__init__.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/15297.bugfix diff --git a/changelog.d/15297.bugfix b/changelog.d/15297.bugfix new file mode 100644 index 0000000000..b5735fe4da --- /dev/null +++ b/changelog.d/15297.bugfix @@ -0,0 +1 @@ +Fix a bug introduced in Synapse v1.55.0 which could delay remote homeservers being able to decrypt encrypted messages sent by local users. diff --git a/synapse/federation/send_queue.py b/synapse/federation/send_queue.py index 3063df7990..0b7c81677e 100644 --- a/synapse/federation/send_queue.py +++ b/synapse/federation/send_queue.py @@ -244,7 +244,7 @@ class FederationRemoteSendQueue(AbstractFederationSender): self.notifier.on_new_replication_data() - def send_device_messages(self, destination: str, immediate: bool = False) -> None: + def send_device_messages(self, destination: str, immediate: bool = True) -> None: """As per FederationSender""" # We don't need to replicate this as it gets sent down a different # stream. diff --git a/synapse/federation/sender/__init__.py b/synapse/federation/sender/__init__.py index 43421a9c72..106daa9184 100644 --- a/synapse/federation/sender/__init__.py +++ b/synapse/federation/sender/__init__.py @@ -783,7 +783,7 @@ class FederationSender(AbstractFederationSender): else: queue.send_edu(edu) - def send_device_messages(self, destination: str, immediate: bool = False) -> None: + def send_device_messages(self, destination: str, immediate: bool = True) -> None: if destination == self.server_name: logger.warning("Not sending device update to ourselves") return