0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-17 23:42:33 +01:00

Auto-consent to the privacy policy if the user registered with terms

This commit is contained in:
Travis Ralston 2018-10-03 15:54:54 -06:00
parent dfcad5fad5
commit f9d34a763c

View file

@ -460,6 +460,12 @@ class RegisterRestServlet(RestServlet):
params.get("bind_msisdn")
)
if auth_result and LoginType.TERMS in auth_result:
logger.info("User %s has consented to the privacy policy" % registered_user_id)
yield self.store.user_set_consent_version(
registered_user_id, self.hs.config.user_consent_version,
)
defer.returnValue((200, return_dict))
def on_OPTIONS(self, _):