Sha256: 2241572698841bd422c6e68c8381f52fcb6c4e1d6f8eed041d0d68a803828490

Contents?: true

Size: 393 Bytes

Versions: 1

Compression:

Stored size: 393 Bytes

Contents

class StreamNotificationsJob < Hyrax::ApplicationJob
  def perform(users)
    Array.wrap(users).each do |user|
      mailbox = UserMailbox.new(user)
      Hyrax::NotificationsChannel.broadcast_to(user,
                                               notifications_count: mailbox.unread_count,
                                               notifications_label: mailbox.label)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hyrax-2.0.0.beta2 app/jobs/stream_notifications_job.rb