From 5f194f9b3d751cc8b4c5abda99e6a6aead1dccb3 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Mon, 20 May 2024 11:58:22 -0500 Subject: [PATCH] Exclude application services See https://github.com/element-hq/synapse/pull/17167#discussion_r1595924522 --- synapse/handlers/sync.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index eeed272d94..46eeaa1dbb 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -1847,9 +1847,11 @@ class SyncHandler: """ user_id = sync_config.user.to_string() - # TODO: Should we exclude app services here? There could be an argument to allow - # them since the appservice doesn't have to make a massive initial sync. - # (related to https://github.com/matrix-org/matrix-doc/issues/1144) + app_service = self.store.get_app_service_by_user_id(user_id) + if app_service: + # We no longer support AS users using /sync directly. + # See https://github.com/matrix-org/matrix-doc/issues/1144 + raise NotImplementedError() sync_result_builder = await self.get_sync_result_builder( sync_config,