0

I have been trying for over a month now to figure out how to setup private conversations with users on my site and not just group conversations which i know how to do wit faye or privatepub gem. So my question how do i create a channel that tow users can always converse with each other anytime just like a private conversation were only those two users can broadcast to each other then any time i want to converse with another user i use a separate channel for that user just like the normal facebook chat which is done realtime but this time i would like to use the private pub gem. Just need a little guidance in achieving this.

Uchenna
  • 4,059
  • 6
  • 40
  • 73

3 Answers3

2

You have a good tutorial here.

I've done it and it's pretty simple =)

This tutorial implements a private conversation like tweeter (example: @user This is a private message to user).

If you want a conversation like facebook, you have to change the code (just a little) to get a private channel (subscribe to a private channel):

<%= subscribe_to "/messages/private/#{session[:username]}" %>
JMarques
  • 3,044
  • 4
  • 34
  • 55
1

Have you checked out http://railscasts.com/episodes/260-messaging-with-faye?

Cyrus
  • 3,687
  • 5
  • 35
  • 67
1

I made a basic chatting app using the private_pub gem that you can check out... amitejprivate-pub.herokuapp.com

You can also check the github repositories at :

https://github.com/amitej1/private_pub

And if you want to set up your app on heroku, you will need a separate app for the faye server, which can be done as per the following :

https://github.com/amitej1/chatting-server