mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
17 lines
473 B
Ruby
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
|