Class: Decidim::Conferences::Admin::NotifyRoleAssignedToConference

Inherits:
Rectify::Command
  • Object
show all
Defined in:
decidim-conferences/app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb

Overview

A command to notify users when a role is assigned for a Conference

Direct Known Subclasses

CreateConferenceAdmin, UpdateConferenceAdmin

Instance Method Summary collapse

Instance Method Details

#send_notification(user) ⇒ Object


8
9
10
11
12
13
14
15
16
17
18
# File 'decidim-conferences/app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb', line 8

def send_notification(user)
  Decidim::EventsManager.publish(
    event: "decidim.events.conferences.role_assigned",
    event_class: Decidim::Conferences::ConferenceRoleAssignedEvent,
    resource: form.current_participatory_space,
    affected_users: [user],
    extra: {
      role: form.role
    }
  )
end