Port "Allow users to click account renewal links multiple times without hitting an 'Invalid Token' page #74" from synapse-dinsic (#9832)

This attempts to be a direct port of https://github.com/matrix-org/synapse-dinsic/pull/74 to mainline. There was some fiddling required to deal with the changes that have been made to mainline since (mainly dealing with the split of `RegistrationWorkerStore` from `RegistrationStore`, and the changes made to `self.make_request` in test code).
This commit is contained in:
Andrew Morgan 2021-04-19 19:16:34 +01:00 committed by GitHub
parent e694a598f8
commit 71f0623de9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 496 additions and 263 deletions

View file

@ -49,7 +49,9 @@ class DeactivateAccountHandler(BaseHandler):
if hs.config.run_background_tasks:
hs.get_reactor().callWhenRunning(self._start_user_parting)
self._account_validity_enabled = hs.config.account_validity.enabled
self._account_validity_enabled = (
hs.config.account_validity.account_validity_enabled
)
async def deactivate_account(
self,