summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2016-08-17 13:15:06 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2016-08-17 16:17:28 +0100
commitfa87c981e1efabe85a88144479b0dd7131b7da12 (patch)
treec7f91057f645e8c8f0d4a0e37b99ed1a75b7c613 /synapse/rest/client
parentInitial empty implementation that just registers an API endpoint handler (diff)
downloadsynapse-fa87c981e1efabe85a88144479b0dd7131b7da12.tar.xz
Thread 3PU lookup through as far as the AS API object; which currently noöps it
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v2_alpha/thirdparty.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/thirdparty.py b/synapse/rest/client/v2_alpha/thirdparty.py
index 9be88b2ba1..0180b73e9f 100644
--- a/synapse/rest/client/v2_alpha/thirdparty.py
+++ b/synapse/rest/client/v2_alpha/thirdparty.py
@@ -16,6 +16,8 @@
 
 import logging
 
+from twisted.internet import defer
+
 from synapse.http.servlet import RestServlet
 from ._base import client_v2_patterns
 
@@ -28,10 +30,15 @@ class ThirdPartyUserServlet(RestServlet):
 
     def __init__(self, hs):
         super(ThirdPartyUserServlet, self).__init__()
-        pass
 
+        self.appservice_handler = hs.get_application_service_handler()
+
+    @defer.inlineCallbacks
     def on_GET(self, request, protocol):
-        return (200, {"TODO":"TODO"})
+        fields = {} # TODO
+        results = yield self.appservice_handler.query_3pu(protocol, fields)
+
+        defer.returnValue((200, results))
 
 
 def register_servlets(hs, http_server):