Sha256: bf62d64524c4ce5aecf98d023da6637c833282bd054a56aa518953b6819b27ba

Contents?: true

Size: 559 Bytes

Versions: 25

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class NotificationGeneratorForRecipientJob < ApplicationJob
    queue_as :events

    def perform(event, event_class_name, resource, recipient, user_role, extra) # rubocop:disable Metrics/ParameterLists
      event_class = event_class_name.constantize
      notification = NotificationGeneratorForRecipient
                     .new(event, event_class, resource, recipient, user_role, extra)
                     .generate

      SendPushNotification.new.perform(notification) if notification
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-core-0.27.2 app/jobs/decidim/notification_generator_for_recipient_job.rb
decidim-core-0.27.1 app/jobs/decidim/notification_generator_for_recipient_job.rb
decidim-core-0.27.0 app/jobs/decidim/notification_generator_for_recipient_job.rb
decidim-core-0.27.0.rc2 app/jobs/decidim/notification_generator_for_recipient_job.rb
decidim-core-0.27.0.rc1 app/jobs/decidim/notification_generator_for_recipient_job.rb