From f883493ad3af4f609e0d001869763f2103af4188 Mon Sep 17 00:00:00 2001 From: "H. Shay" Date: Mon, 20 Mar 2023 13:01:53 -0700 Subject: [PATCH 1/5] change to-device messages default parameter to `immediate=True` --- synapse/federation/sender/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/federation/sender/__init__.py b/synapse/federation/sender/__init__.py index 43421a9c727b..106daa91844f 100644 --- a/synapse/federation/sender/__init__.py +++ b/synapse/federation/sender/__init__.py @@ -783,7 +783,7 @@ def send_edu(self, edu: Edu, key: Optional[Hashable]) -> None: 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 From f206a55661df55867eb9159628c00af8c33a2334 Mon Sep 17 00:00:00 2001 From: "H. Shay" Date: Mon, 20 Mar 2023 13:02:24 -0700 Subject: [PATCH 2/5] newsfragment --- changelog.d/15296.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/15296.bugfix diff --git a/changelog.d/15296.bugfix b/changelog.d/15296.bugfix new file mode 100644 index 000000000000..74c911ef0fb8 --- /dev/null +++ b/changelog.d/15296.bugfix @@ -0,0 +1 @@ +Fix a bug introduced in Synapse v1.55.0 which could cause a delay in sending to-device messages. From ec3612c39af356e4584b55806bc58c4127204358 Mon Sep 17 00:00:00 2001 From: "H. Shay" Date: Mon, 20 Mar 2023 13:15:46 -0700 Subject: [PATCH 3/5] fix changelog number --- changelog.d/{15296.bugfix => 15297.bugfix} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{15296.bugfix => 15297.bugfix} (100%) diff --git a/changelog.d/15296.bugfix b/changelog.d/15297.bugfix similarity index 100% rename from changelog.d/15296.bugfix rename to changelog.d/15297.bugfix From c60d2952ee1abf13c16c96be5d258bbfe87a6c5a Mon Sep 17 00:00:00 2001 From: Shay Date: Tue, 21 Mar 2023 10:27:15 -0700 Subject: [PATCH 4/5] Update changelog.d/15297.bugfix Co-authored-by: David Robertson --- changelog.d/15297.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/15297.bugfix b/changelog.d/15297.bugfix index 74c911ef0fb8..b5735fe4da85 100644 --- a/changelog.d/15297.bugfix +++ b/changelog.d/15297.bugfix @@ -1 +1 @@ -Fix a bug introduced in Synapse v1.55.0 which could cause a delay in sending to-device messages. +Fix a bug introduced in Synapse v1.55.0 which could delay remote homeservers being able to decrypt encrypted messages sent by local users. From 9471283956074b69409af13784e575f0cc1ff980 Mon Sep 17 00:00:00 2001 From: "H. Shay" Date: Tue, 21 Mar 2023 16:23:15 -0700 Subject: [PATCH 5/5] unify function signatures --- synapse/federation/send_queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/federation/send_queue.py b/synapse/federation/send_queue.py index 3063df799099..0b7c81677ebd 100644 --- a/synapse/federation/send_queue.py +++ b/synapse/federation/send_queue.py @@ -244,7 +244,7 @@ def send_presence_to_destinations( 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.