mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-02 20:59:12 +01:00
Merge pull request #727 from matrix-org/kegan/fix-asapi-reg
Make v2_alpha reg follow the AS API specification
This commit is contained in:
commit
4802f9cdb6
1 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,11 @@ class RegisterRestServlet(RestServlet):
|
||||||
|
|
||||||
# == Application Service Registration ==
|
# == Application Service Registration ==
|
||||||
if appservice:
|
if appservice:
|
||||||
|
# Set the desired user according to the AS API (which uses the
|
||||||
|
# 'user' key not 'username'). Since this is a new addition, we'll
|
||||||
|
# fallback to 'username' if they gave one.
|
||||||
|
if isinstance(body.get("user"), basestring):
|
||||||
|
desired_username = body["user"]
|
||||||
result = yield self._do_appservice_registration(
|
result = yield self._do_appservice_registration(
|
||||||
desired_username, request.args["access_token"][0]
|
desired_username, request.args["access_token"][0]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue