From a03ed5e6ae23e52941e91ecb892a7b5c88964d90 Mon Sep 17 00:00:00 2001 From: reivilibre Date: Thu, 30 Sep 2021 11:06:47 +0100 Subject: Fix issue causing sending presence to ASes to fail (due to incomplete type annotations) (#10944) --- synapse/handlers/presence.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'synapse') diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 983c837c66..404afb9402 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -52,6 +52,7 @@ import synapse.metrics from synapse.api.constants import EventTypes, Membership, PresenceState from synapse.api.errors import SynapseError from synapse.api.presence import UserPresenceState +from synapse.appservice import ApplicationService from synapse.events.presence_router import PresenceRouter from synapse.logging.context import run_in_background from synapse.logging.utils import log_function @@ -1521,10 +1522,11 @@ class PresenceEventSource(EventSource[int, UserPresenceState]): user: UserID, from_key: Optional[int], limit: Optional[int] = None, - room_ids: Optional[List[str]] = None, + room_ids: Optional[Collection[str]] = None, is_guest: bool = False, explicit_room_id: Optional[str] = None, include_offline: bool = True, + service: Optional[ApplicationService] = None, ) -> Tuple[List[UserPresenceState], int]: # The process for getting presence events are: # 1. Get the rooms the user is in. -- cgit 1.4.1 From c4bf48ee6fa4662d88a5bf682e79787851fe9cd8 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 28 Sep 2021 22:00:04 -0500 Subject: Fix event context for outliers in important MSC2716 spot (#10938) Fix event context for outlier causing failures in all of the MSC2716 Complement tests. The `EventContext.for_outlier` refactor happened in https://github.com/matrix-org/synapse/pull/10883 and this spot was left out. --- changelog.d/10938.bugfix | 1 + synapse/handlers/message.py | 13 ++++--------- 2 files changed, 5 insertions(+), 9 deletions(-) create mode 100644 changelog.d/10938.bugfix (limited to 'synapse') diff --git a/changelog.d/10938.bugfix b/changelog.d/10938.bugfix new file mode 100644 index 0000000000..9cf0ea8788 --- /dev/null +++ b/changelog.d/10938.bugfix @@ -0,0 +1 @@ +Fix bug introduced in Synapse 1.44 which caused the experimental [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint to return a 500 error. diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index c66aefe2c4..fd861e94f8 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -952,18 +952,13 @@ class EventCreationHandler: depth=depth, ) - old_state = None - # Pass on the outlier property from the builder to the event # after it is created if builder.internal_metadata.outlier: - event.internal_metadata.outlier = builder.internal_metadata.outlier - - # Calculate the state for outliers that pass in their own `auth_event_ids` - if auth_event_ids: - old_state = await self.store.get_events_as_list(auth_event_ids) - - context = await self.state.compute_event_context(event, old_state=old_state) + event.internal_metadata.outlier = True + context = EventContext.for_outlier() + else: + context = await self.state.compute_event_context(event) if requester: context.app_service = requester.app_service -- cgit 1.4.1 From 3412f5c8d8c8aff5bcf9b0e5012dfa2f4e895464 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Thu, 30 Sep 2021 12:40:24 +0100 Subject: 1.44.0rc2 --- CHANGES.md | 16 ++++++++++++++++ changelog.d/10919.doc | 1 - changelog.d/10938.bugfix | 1 - changelog.d/10944.bugfix | 1 - debian/changelog | 6 ++++++ synapse/__init__.py | 2 +- 6 files changed, 23 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/10919.doc delete mode 100644 changelog.d/10938.bugfix delete mode 100644 changelog.d/10944.bugfix (limited to 'synapse') diff --git a/CHANGES.md b/CHANGES.md index 271e2271fb..59ff967633 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,19 @@ +Synapse 1.44.0rc2 (2021-09-30) +============================== + +Bugfixes +-------- + +- Fix a bug introduced in v1.44.0rc1 which caused the experimental [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint to return a 500 error. ([\#10938](https://github.com/matrix-org/synapse/issues/10938)) +- Fix a bug introduced in v1.44.0rc1 which prevented sending presence events to application services. ([\#10944](https://github.com/matrix-org/synapse/issues/10944)) + + +Improved Documentation +---------------------- + +- Minor updates to the installation instructions. ([\#10919](https://github.com/matrix-org/synapse/issues/10919)) + + Synapse 1.44.0rc1 (2021-09-29) ============================== diff --git a/changelog.d/10919.doc b/changelog.d/10919.doc deleted file mode 100644 index d0bddc3f1b..0000000000 --- a/changelog.d/10919.doc +++ /dev/null @@ -1 +0,0 @@ -Minor updates to the installation instructions. diff --git a/changelog.d/10938.bugfix b/changelog.d/10938.bugfix deleted file mode 100644 index 9cf0ea8788..0000000000 --- a/changelog.d/10938.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix bug introduced in Synapse 1.44 which caused the experimental [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint to return a 500 error. diff --git a/changelog.d/10944.bugfix b/changelog.d/10944.bugfix deleted file mode 100644 index 49baff7df1..0000000000 --- a/changelog.d/10944.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix a bug introduced in v1.44.0rc1 which prevented sending presence events to application services. diff --git a/debian/changelog b/debian/changelog index 191bb97c5e..b08a592780 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +matrix-synapse-py3 (1.44.0~rc2) stable; urgency=medium + + * New synapse release 1.44.0~rc2. + + -- Synapse Packaging team Thu, 30 Sep 2021 12:39:10 +0100 + matrix-synapse-py3 (1.44.0~rc1) stable; urgency=medium * New synapse release 1.44.0~rc1. diff --git a/synapse/__init__.py b/synapse/__init__.py index a1fec8ad2b..8791c20e26 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -47,7 +47,7 @@ try: except ImportError: pass -__version__ = "1.44.0rc1" +__version__ = "1.44.0rc2" if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)): # We import here so that we don't have to install a bunch of deps when -- cgit 1.4.1