Sha256: 2f5d5bad23ac01d96a62bfc25aca81d8b88cedcb93ed4b93398d7aad4a13d251

Contents?: true

Size: 647 Bytes

Versions: 34

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 < Rectify::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

34 entries across 34 versions & 1 rubygems

Version Path
decidim-conferences-0.26.10 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.9 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.8 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.7 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.5 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.4 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.3 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.2 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.0 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.0.rc2 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.26.0.rc1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.25.2 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.25.1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.25.0 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.25.0.rc4 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.25.0.rc3 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.25.0.rc2 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.25.0.rc1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.24.3 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb