0

I am using private_pub gem for chat. When im using email_is of user as custom channel name it throws invalid channel error. How could i used email_id as channel name?

1 Answers1

0

the channel is url path like this "/messages/new"

So you would like the url to be "/messages/:id/new"

where :id = your email.

However you will have to escape the email first or hash it like this:

CGI.escape email_address # to escape characters

Digest::SHA1.hexdigest email_address # to convert to SHA

Mitch VanDuyn
  • 2,838
  • 1
  • 22
  • 29