diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2016-08-18 14:56:02 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2016-08-18 14:56:02 +0100 |
commit | 434bbf2cb5b31f5a8430a06f53549248f7306cfd (patch) | |
tree | 7ef3c6156c6867f85e42de458ff94407911ddad5 /synapse/handlers/appservice.py | |
parent | Merge remote-tracking branch 'origin/develop' into paul/thirdpartylookup (diff) | |
download | synapse-434bbf2cb5b31f5a8430a06f53549248f7306cfd.tar.xz |
Filter 3PU lookups by only ASes that declare knowledge of that protocol
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r-- | synapse/handlers/appservice.py | 6 |
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): |