From 434bbf2cb5b31f5a8430a06f53549248f7306cfd Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Thu, 18 Aug 2016 14:56:02 +0100 Subject: Filter 3PU lookups by only ASes that declare knowledge of that protocol --- synapse/handlers/appservice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'synapse/handlers/appservice.py') diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index 52e897d8d9..e0a6c9f19d 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -191,9 +191,11 @@ class ApplicationServicesHandler(object): @defer.inlineCallbacks def _get_services_for_3pn(self, protocol): - # TODO(paul): Filter by protocol services = yield self.store.get_app_services() - defer.returnValue(services) + interested_list = [ + s for s in services if s.is_interested_in_protocol(protocol) + ] + defer.returnValue(interested_list) @defer.inlineCallbacks def _is_unknown_user(self, user_id): -- cgit 1.4.1