summary refs log tree commit diff
path: root/synapse/appservice
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/appservice')
-rw-r--r--synapse/appservice/api.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py
index 6da6a1b62e..e05570cc8b 100644
--- a/synapse/appservice/api.py
+++ b/synapse/appservice/api.py
@@ -72,6 +72,17 @@ class ApplicationServiceApi(SimpleHttpClient):
         defer.returnValue(False)
 
     @defer.inlineCallbacks
+    def query_3pu(self, service, protocol, fields):
+        uri = service.url + ("/3pu/%s" % urllib.quote(protocol))
+        response = None
+        try:
+            response = yield self.get_json(uri, fields)
+            defer.returnValue(response)
+        except Exception as ex:
+            logger.warning("query_3pu to %s threw exception %s", uri, ex)
+            defer.returnValue([])
+
+    @defer.inlineCallbacks
     def push_bulk(self, service, events, txn_id=None):
         events = self._serialize(events)