Add interstitial for Terms of Service updates (#34527)

This commit is contained in:
Claire 2025-05-16 16:03:05 +02:00 committed by GitHub
parent c4f47adb49
commit 8cc5084ca1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 72 additions and 4 deletions

View file

@ -6,6 +6,8 @@ class Admin::DistributeTermsOfServiceNotificationWorker
def perform(terms_of_service_id)
terms_of_service = TermsOfService.find(terms_of_service_id)
terms_of_service.scope_for_interstitial.in_batches.update_all(require_tos_interstitial: true)
terms_of_service.scope_for_notification.find_each do |user|
UserMailer.terms_of_service_changed(user, terms_of_service).deliver_later!
end