summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-01-29 13:26:15 +0000
committerMark Haines <mark.haines@matrix.org>2016-01-29 13:26:15 +0000
commit5687a00e4ec24b78e41b0377bfe524d7f0b13a43 (patch)
tree9f439b7ba5b4f8b776cc20aa88f24ad4230b144b /synapse/rest/client/v2_alpha
parentPrune on fetching (diff)
downloadsynapse-5687a00e4ec24b78e41b0377bfe524d7f0b13a43.tar.xz
Allow three_pid_creds as well as threePidCreds in /account/3pid
Diffstat (limited to 'synapse/rest/client/v2_alpha')
-rw-r--r--synapse/rest/client/v2_alpha/account.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py
index d507172704..a614b79d45 100644
--- a/synapse/rest/client/v2_alpha/account.py
+++ b/synapse/rest/client/v2_alpha/account.py
@@ -116,9 +116,10 @@ class ThreepidRestServlet(RestServlet):
 
         body = parse_json_dict_from_request(request)
 
-        if 'threePidCreds' not in body:
+        threePidCreds = body.get('threePidCreds')
+        threePidCreds = body.get('three_pid_creds', threePidCreds)
+        if threePidCreds is None:
             raise SynapseError(400, "Missing param", Codes.MISSING_PARAM)
-        threePidCreds = body['threePidCreds']
 
         requester = yield self.auth.get_user_by_req(request)
         user_id = requester.user.to_string()