Use account_threepid_delegate for 3pid validation

This commit is contained in:
Andrew Morgan 2019-09-10 15:57:32 +01:00
parent 30b67e0f63
commit 60d3c57bd0
3 changed files with 46 additions and 43 deletions

View file

@ -523,7 +523,8 @@ class ThreepidRestServlet(RestServlet):
requester = yield self.auth.get_user_by_req(request)
user_id = requester.user.to_string()
threepid = yield self.identity_handler.threepid_from_creds(threepid_creds)
# Retrieve the identity server from the request
threepid = yield self.identity_handler.threepid_from_creds(None, threepid_creds)
if not threepid:
raise SynapseError(400, "Failed to auth 3pid", Codes.THREEPID_AUTH_FAILED)