Set the service ID as soon as it is known.

This commit is contained in:
Kegan Dougal 2015-03-16 15:24:32 +00:00
parent d04fa1f712
commit f0d6f724a2
2 changed files with 5 additions and 4 deletions

View file

@ -59,13 +59,13 @@ class ApplicationServicesHandler(object):
)
if not stored_service:
raise StoreError(404, "Application service not found")
app_service.id = stored_service.id
except StoreError:
raise SynapseError(
403, "Unrecognised application services token. "
"Consult the home server admin.",
errcode=Codes.FORBIDDEN
)
app_service.hs_token = self._generate_hs_token()
# create a sender for this application service which is used when