Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

unsubscribe missing #45

Open
mrbrdo opened this issue Mar 12, 2012 · 2 comments
Open

unsubscribe missing #45

mrbrdo opened this issue Mar 12, 2012 · 2 comments

Comments

@mrbrdo
Copy link

mrbrdo commented Mar 12, 2012

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

@mrrooijen
Copy link

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.

@nir0
Copy link

nir0 commented Apr 27, 2012

a hack:

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants