diff options
author | Daniel Wagner-Hall <dawagner@gmail.com> | 2016-03-10 15:58:27 +0000 |
---|---|---|
committer | Daniel Wagner-Hall <dawagner@gmail.com> | 2016-03-10 15:58:27 +0000 |
commit | 379c60b08d0dd8ca5e9fc676a9f6ba00943f0348 (patch) | |
tree | bb7164c248e8a103eca1ee4f2c2d75a29e7800f9 /synapse/handlers | |
parent | Merge pull request #639 from matrix-org/erikj/as_user_update_batch (diff) | |
parent | Store appservice ID on register (diff) | |
download | synapse-379c60b08d0dd8ca5e9fc676a9f6ba00943f0348.tar.xz |
Merge pull request #638 from matrix-org/daniel/appserviceid
Store appservice ID on register
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/register.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index e2ace6a4e5..6ffb8c0da6 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -182,6 +182,8 @@ class RegistrationHandler(BaseHandler): errcode=Codes.EXCLUSIVE ) + service_id = service.id if service.is_exclusive_user(user_id) else None + yield self.check_user_id_not_appservice_exclusive( user_id, allowed_appservice=service ) @@ -190,7 +192,8 @@ class RegistrationHandler(BaseHandler): yield self.store.register( user_id=user_id, token=token, - password_hash="" + password_hash="", + appservice_id=service_id, ) yield registered_user(self.distributor, user) defer.returnValue((user_id, token)) |