Sha256: 6c527b910ac718ef6299619b45bf186018b821814ea281ec1364869e97cca8fe
Contents?: true
Size: 548 Bytes
Versions: 29
Compression:
Stored size: 548 Bytes
Contents
# frozen_string_literal: true 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
29 entries across 29 versions & 1 rubygems