0

I implemented actioncable for real time messaging, Now I want to know who received the message posted by me. all users are communicating using the same channel

class RoomChannel < ApplicationCable::Channel
  def subscribed
    stream_from "room_channel"
  end

  def speak(data)
    Message.create_message(data, current_user)
  end
end

Exact idea is described in attached image, this will perform while I reload the page, but I want to distinguish on action of receive message.enter image description here

Ren
  • 1,379
  • 2
  • 12
  • 24
ashvin
  • 2,020
  • 1
  • 16
  • 33

1 Answers1

0

This tutorial has both a chat room implementation and a one to one implementation of chatting using action cable. Its the best tutorial out there to start with action cable. Go here https://www.learnenough.com/action-cable-tutorial.

Rush0312
  • 159
  • 5