Skip to content
Snippets Groups Projects
Commit 4a9cbdbc authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Exempt AS-registered users from doing gdpr

parent 235b5326
No related branches found
No related tags found
No related merge requests found
...@@ -572,6 +572,9 @@ class EventCreationHandler(object): ...@@ -572,6 +572,9 @@ class EventCreationHandler(object):
u = yield self.store.get_user_by_id(user_id) u = yield self.store.get_user_by_id(user_id)
assert u is not None assert u is not None
if u["appservice_id"] is not None:
# users registered by an appservice are exempt
return
if u["consent_version"] == self.config.user_consent_version: if u["consent_version"] == self.config.user_consent_version:
return return
......
...@@ -36,6 +36,7 @@ class RegistrationWorkerStore(SQLBaseStore): ...@@ -36,6 +36,7 @@ class RegistrationWorkerStore(SQLBaseStore):
retcols=[ retcols=[
"name", "password_hash", "is_guest", "name", "password_hash", "is_guest",
"consent_version", "consent_server_notice_sent", "consent_version", "consent_server_notice_sent",
"appservice_id",
], ],
allow_none=True, allow_none=True,
desc="get_user_by_id", desc="get_user_by_id",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment