Class: Chat::NotificationRelayJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/chat/notification_relay_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(message) ⇒ Object



5
6
7
8
9
# File 'app/jobs/chat/notification_relay_job.rb', line 5

def perform(message)
  user_ids(message).each do |user_id|
    broadcast("users::#{user_id}::chats", chat_id: message.conversation_id)
  end
end