diff options
author | Kegan Dougal <kegan@matrix.org> | 2015-02-09 12:03:37 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2015-02-09 12:03:37 +0000 |
commit | ac3183caaa66b750996d90c0ac9ed430f623909c (patch) | |
tree | 3cddc8ef5230ac7e206fd0aa0d308feffae79f10 /synapse/handlers/appservice.py | |
parent | Add errcodes for appservice registrations. (diff) | |
download | synapse-ac3183caaa66b750996d90c0ac9ed430f623909c.tar.xz |
Register a user account for the AS when the AS registers. Add 'sender' column to AS table.
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r-- | synapse/handlers/appservice.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index fa810b9a98..5071a12eb1 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -52,8 +52,14 @@ class ApplicationServicesHandler(object): "Consult the home server admin.", errcode=Codes.FORBIDDEN ) - logger.info("Updating application service info...") + app_service.hs_token = self._generate_hs_token() + + # create a sender for this application service which is used when + # creating rooms, etc.. + account = yield self.hs.get_handlers().registration_handler.register() + app_service.sender = account[0] + yield self.store.update_app_service(app_service) defer.returnValue(app_service) |