0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-17 15:31:19 +01:00

Fix guest -> real account upgrade with account validity enabled (#6359)

This commit is contained in:
Andrew Morgan 2019-11-14 12:02:05 +00:00 committed by GitHub
parent 6e1b40dc26
commit 745a48625d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

1
changelog.d/6359.bugfix Normal file
View file

@ -0,0 +1 @@
Fix bug where upgrading a guest account to a full user would fail when account validity is enabled.

View file

@ -361,14 +361,11 @@ class SQLBaseStore(object):
expiration_ts, expiration_ts,
) )
self._simple_insert_txn( self._simple_upsert_txn(
txn, txn,
"account_validity", "account_validity",
values={ keyvalues={"user_id": user_id},
"user_id": user_id, values={"expiration_ts_ms": expiration_ts, "email_sent": False},
"expiration_ts_ms": expiration_ts,
"email_sent": False,
},
) )
def start_profiling(self): def start_profiling(self):