diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-01-29 13:26:15 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-01-29 13:26:15 +0000 |
commit | 5687a00e4ec24b78e41b0377bfe524d7f0b13a43 (patch) | |
tree | 9f439b7ba5b4f8b776cc20aa88f24ad4230b144b | |
parent | Prune on fetching (diff) | |
download | synapse-5687a00e4ec24b78e41b0377bfe524d7f0b13a43.tar.xz |
Allow three_pid_creds as well as threePidCreds in /account/3pid
-rw-r--r-- | synapse/rest/client/v2_alpha/account.py | 5 |
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() |