What is correct way to filter broadcasted messages [ActionCable]
14 views
Skip to first unread message
nate.t...@gmail.com
unread,
Apr 1, 2016, 10:09:33 AM4/1/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Hey guys,
Let's assume we have mute command in chat application, users are subscribed to all messages. But some users mutes other users, is there any way to not deliver messages from muted user to those who muted him? If we simply do rebroadcast in our ChatChannel?
# app/channels/chat_channel.rb classChatChannel<ApplicationCable::Channel defsubscribed stream_from "chat" end
defreceive(data) ChatChannel.broadcast_to "chat", data end end