Sha256: ee9e1f8a3f34ef3f175b7bc361cba845ede7561adc9805ed276fed1e25382981
Contents?: true
Size: 518 Bytes
Versions: 46
Compression:
Stored size: 518 Bytes
Contents
class StreamNotificationsJob < Hyrax::ApplicationJob def perform(users) # Do not use the ActionCable machinery if the feature is disabled return unless Hyrax.config.realtime_notifications? 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
46 entries across 46 versions & 1 rubygems