Exempt AS-registered users from doing gdpr

pull/3304/head
Richard van der Hoff 2018-05-29 19:54:32 +01:00
parent 235b53263a
commit 4a9cbdbc15
2 changed files with 4 additions and 0 deletions

View File

@ -572,6 +572,9 @@ class EventCreationHandler(object):
u = yield self.store.get_user_by_id(user_id)
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:
return

View File

@ -36,6 +36,7 @@ class RegistrationWorkerStore(SQLBaseStore):
retcols=[
"name", "password_hash", "is_guest",
"consent_version", "consent_server_notice_sent",
"appservice_id",
],
allow_none=True,
desc="get_user_by_id",