private_pub icon indicating copy to clipboard operation
private_pub copied to clipboard

unsubscribe missing

Open mrbrdo opened this issue 13 years ago • 2 comments

It seems unsubscribe functionality is missing. "sign"-ing twice to the same channel makes duplicate messages.

mrbrdo avatar Mar 12 '12 18:03 mrbrdo

I second this feature. It would be nice to be able to subscribe and unsubscribe, especially when you're working with full-JS front-end applications, like the ones you write in Backbone, Spine, Ember, Knockout, Knockback, Batman, Sproutcore, etc.

Being able to toggle between subscribe and unsubscribe would be a great addition, even if it means having to set the expiration to never. It should be safe enough when going over an HTTPS protocol I assume.

mrrooijen avatar Apr 24 '12 23:04 mrrooijen

a hack:

  :javascript
    if(!$(window).data("connected")){
    #{subscribe_to("/chat/#{@chat.id}").gsub('</script>', '').gsub('<script type="text/javascript">','')}
    $(window).data("connected", true)
    }

nir0 avatar Apr 27 '12 06:04 nir0