diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2022-09-08 17:41:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 15:41:48 +0000 |
commit | f799eac7ea96f943ad1272a5a81f845dfa08a254 (patch) | |
tree | f966214e3e9a49ac68364f0c51f82229ac442ff0 /synapse/storage/databases | |
parent | Update docstrings to explain the impact of partial state (#13750) (diff) | |
download | synapse-f799eac7ea96f943ad1272a5a81f845dfa08a254.tar.xz |
Add timestamp to user's consent (#13741)
Co-authored-by: reivilibre <olivier@librepush.net>
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r-- | synapse/storage/databases/main/registration.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/registration.py b/synapse/storage/databases/main/registration.py index 7fb9c801da..ac821878b0 100644 --- a/synapse/storage/databases/main/registration.py +++ b/synapse/storage/databases/main/registration.py @@ -175,6 +175,7 @@ class RegistrationWorkerStore(CacheInvalidationWorkerStore): "is_guest", "admin", "consent_version", + "consent_ts", "consent_server_notice_sent", "appservice_id", "creation_ts", @@ -2227,7 +2228,10 @@ class RegistrationStore(StatsStore, RegistrationBackgroundUpdateStore): txn, table="users", keyvalues={"name": user_id}, - updatevalues={"consent_version": consent_version}, + updatevalues={ + "consent_version": consent_version, + "consent_ts": self._clock.time_msec(), + }, ) self._invalidate_cache_and_stream(txn, self.get_user_by_id, (user_id,)) |