summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2016-08-18 14:56:02 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2016-08-18 14:56:02 +0100
commit434bbf2cb5b31f5a8430a06f53549248f7306cfd (patch)
tree7ef3c6156c6867f85e42de458ff94407911ddad5 /synapse/handlers
parentMerge remote-tracking branch 'origin/develop' into paul/thirdpartylookup (diff)
downloadsynapse-434bbf2cb5b31f5a8430a06f53549248f7306cfd.tar.xz
Filter 3PU lookups by only ASes that declare knowledge of that protocol
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/appservice.py6
1 files changed, 4 insertions, 2 deletions
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):