Chatwoot/app/jobs/action_cable_broadcast_job.rb

10 lines
234 B
Ruby
Raw Permalink Normal View History

class ActionCableBroadcastJob < ApplicationJob
queue_as :default
def perform(members, event_name, data)
members.each do |member|
ActionCable.server.broadcast(member, { event: event_name, data: data })
end
end
end