1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-30 11:24:21 +01:00
fab-manager/app/workers/notify_privacy_update_worker.rb

17 lines
473 B
Ruby
Raw Normal View History

# 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