Sha256: 9e7d57fb87e378d977948e97b7994926040274d5c1bfbfc1bfb3432b2cd5e99b

Contents?: true

Size: 647 Bytes

Versions: 12

Compression:

Stored size: 647 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    module Admin
      # A command to notify users when a role is assigned for a Conference
      class NotifyRoleAssignedToConference < Decidim::Command
        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
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
decidim-conferences-0.27.9 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.8 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.7 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.6 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.5 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.4 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.3 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.2 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.0 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.0.rc2 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.27.0.rc1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb