summary refs log tree commit diff
path: root/synapse/handlers/appservice.py
diff options
context:
space:
mode:
authorPaul Evans <leonerd@leonerd.org.uk>2016-08-25 17:06:53 +0100
committerGitHub <noreply@github.com>2016-08-25 17:06:53 +0100
commitd9dcb2ba3a6f9fbdc286581e772e7fa5ed9086fc (patch)
tree3686942d7fc944d528518102fc3276a8bac33587 /synapse/handlers/appservice.py
parentMerge branch 'release-v0.17.1' of github.com:matrix-org/synapse into develop (diff)
parentappease pep8 (diff)
downloadsynapse-d9dcb2ba3a6f9fbdc286581e772e7fa5ed9086fc.tar.xz
Merge pull request #1041 from matrix-org/paul/third-party-lookup
Extend 3PE lookup APIs for metadata query
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r--synapse/handlers/appservice.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index 306686a384..b440280b74 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -176,6 +176,16 @@ class ApplicationServicesHandler(object):
         defer.returnValue(ret)
 
     @defer.inlineCallbacks
+    def get_3pe_protocols(self):
+        services = yield self.store.get_app_services()
+        protocols = {}
+        for s in services:
+            for p in s.protocols:
+                protocols[p] = yield self.appservice_api.get_3pe_protocol(s, p)
+
+        defer.returnValue(protocols)
+
+    @defer.inlineCallbacks
     def _get_services_for_event(self, event):
         """Retrieve a list of application services interested in this event.