Sha256: ced5a346803c58198c343e2df3c799b3a414544df4aa1f47a586f881d8520535

Contents?: true

Size: 689 Bytes

Versions: 7

Compression:

Stored size: 689 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module Workflow
    class DepositedNotification < AbstractNotification
      private

      def subject
        I18n.t('hyrax.notifications.workflow.deposited.subject')
      end

      def message
        I18n.t('hyrax.notifications.workflow.deposited.message', title: title, link: (link_to work_id, document_path),
                                                                 user: user.user_key, comment: comment)
      end

      def users_to_notify
        user_key = Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: work_id).depositor
        super << ::User.find_by(email: user_key)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hyrax-3.1.0 app/services/hyrax/workflow/deposited_notification.rb
hyrax-3.0.2 app/services/hyrax/workflow/deposited_notification.rb
hyrax-3.0.1 app/services/hyrax/workflow/deposited_notification.rb
hyrax-3.0.0 app/services/hyrax/workflow/deposited_notification.rb
hyrax-3.0.0.pre.rc4 app/services/hyrax/workflow/deposited_notification.rb
hyrax-3.0.0.pre.rc3 app/services/hyrax/workflow/deposited_notification.rb
hyrax-3.0.0.pre.rc2 app/services/hyrax/workflow/deposited_notification.rb