1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-04 15:24:23 +01:00
fab-manager/app/workers/notify_privacy_update_worker.rb
2020-01-14 14:33:00 +01:00

17 lines
473 B
Ruby

# frozen_string_literal: true
# Send an email to all users (with role member) in the database to alert them about a privacy policy change
class NotifyPrivacyUpdateWorker
include Sidekiq::Worker
def perform(setting_id)
setting = Setting.find(setting_id)
# notify all users
NotificationCenter.call type: :notify_privacy_policy_changed,
receiver: User.members.all,
attached_object: setting
end
end