summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2016-08-25 18:35:38 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2016-08-25 18:35:38 +0100
commit9459137f1ed18ebd0e2a1ff728868dafcd9c9c1a (patch)
tree3f78b4a5870743e84c984446231546011da0927c
parentMove ThirdPartyEntityKind into api.constants so the expectation becomes that ... (diff)
downloadsynapse-9459137f1ed18ebd0e2a1ff728868dafcd9c9c1a.tar.xz
Just sprintf the 'kind' argument into uri directly
Diffstat (limited to '')
-rw-r--r--synapse/appservice/api.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py
index 24253e7785..775417eb21 100644
--- a/synapse/appservice/api.py
+++ b/synapse/appservice/api.py
@@ -106,10 +106,8 @@ class ApplicationServiceApi(SimpleHttpClient):
     @defer.inlineCallbacks
     def query_3pe(self, service, kind, protocol, fields):
         if kind == ThirdPartyEntityKind.USER:
-            fragment = "user"
             required_field = "userid"
         elif kind == ThirdPartyEntityKind.LOCATION:
-            fragment = "location"
             required_field = "alias"
         else:
             raise ValueError(
@@ -119,7 +117,7 @@ class ApplicationServiceApi(SimpleHttpClient):
         uri = "%s%s/thirdparty/%s/%s" % (
             service.url,
             APP_SERVICE_PREFIX,
-            fragment,
+            kind,
             urllib.quote(protocol)
         )
         try: