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.23.6 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.24.2 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.23.5 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.24.1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.24.0 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.24.0.rc2 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.23.4 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.24.0.rc1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.23.3 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.23.2 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.23.1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.23.1.rc1 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.23.0 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb
decidim-conferences-0.22.0 app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb