WebRtc chat app with Rails 6

159 views
Skip to first unread message

fugee ohu

unread,
Oct 10, 2019, 9:30:09 PM10/10/19
to Ruby on Rails: Talk
I wanna use channel for 2 users to chat privately with each other but channels are hard coded into the app To build for 2 people to chat privately I would have to create channels on the fly because if 2 people chat in a channel and then 2 other people begin a chat in the same channel then there would be 4 users in the channel What to do?

Rob Jonson

unread,
Oct 11, 2019, 7:11:14 AM10/11/19
to Ruby on Rails: Talk
https://lmgtfy.com/?q=how+to+%20use+websockets+in+rails

and for those new to fugee who think this is a little harsh

I don't think you'll find a single question where the smallest amount of effort has been shown before he asks the group to do his work for him

fugee ohu

unread,
Oct 11, 2019, 7:28:25 AM10/11/19
to Ruby on Rails: Talk
You can disregard what you don't like Stay off my threads  You have no right to libel me in public forum where millions of people are reading You wanna have a popularity contest and divide a forum on personal grounds because you're a bad person

Walther Diechmann

unread,
Oct 11, 2019, 7:54:00 AM10/11/19
to Ruby
FWIW Rob is not libelling you - and I’m pretty sure he’s not rooting for a beauty pageant either ;)

it’s a simple google - and just a little bit of effort on your part: https://www.google.com/search?q=web+channel+rails

Channels are meant to be for ‘all’ to publish/subscribe to - but you could devise a way to narrow the channel like 

consumer.subscriptions.create({ channel: "ChatChannel", room: “A Room for me and my best pal Rob!" })


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3494b63c-48b3-477a-b27a-e74493b0a479%40googlegroups.com.

fugee ohu

unread,
Oct 11, 2019, 9:39:56 AM10/11/19
to Ruby on Rails: Talk
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.


 I thought I'd be creating a channel called let's say "room" I'm surprised to see the room argument passed to subscriptions.create I guess I do have some more reading to do
Message has been deleted

fugee ohu

unread,
Oct 15, 2019, 9:54:49 PM10/15/19
to Ruby on Rails: Talk
Thanks Can you show me where I would use the room: value pair elsewhere to limit the chat to the intended 2 users only

Rob Jonson

unread,
Oct 17, 2019, 1:09:12 AM10/17/19
to Ruby on Rails: Talk


On Tuesday, 15 October 2019 18:54:49 UTC-7, fugee ohu wrote:
Thanks Can you show me where I would use the room: value pair elsewhere to limit the chat to the intended 2 users only

guess what; The Rails Action Cable guide talks about authorization


I know it's pretty obscure, and not somewhere you would expect to look, but Google has your back too

fugee ohu

unread,
Oct 18, 2019, 4:47:27 AM10/18/19
to Ruby on Rails: Talk
Thanks Will read asap Working on the video part right now I had already decided to limit the participants of the text chat with a where filter to @messages= in the controller Does that sound about right?
Reply all
Reply to author
Forward
0 new messages