ryanb / private_pub

Handle pub/sub messaging through private channels in Rails using Faye.
MIT License
864 stars 228 forks source link

Publish through JS #99

Open caffeineshock opened 10 years ago

caffeineshock commented 10 years ago

I doubt that this will be merged anytime soon into master, but this code allows clients to publish messages directly. Before, you always had to call some rails code in order to publish messages in non-meta channels.

However, the contents published this way are not sanitized in any way or form. This should either be done by the receiving client or the faye server itself.

To control which channels a client may publish to you can specify the option publish (default: false) when calling subscribe_to:

<%= subscribe_to "foo", publish: true %>
simonoff commented 9 years ago

this gem is not supported. Please look on https://github.com/dotpromo/danthes