thrykol
unread,May 16, 2011, 11:21:09 AM5/16/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Hookbox User Group
Hi,
Once a users cancels their subscription to a channel, it appears that
no other users in that channel can cancel. In js_src/hookbox.js the
cancel() function checks to see if the property is set and does not
take any actions if it is true. I'm not strong in Python but it seems
there may be a scope issue. I have gotten around the issue in my
environment by resetting the property in my javascript code after a
cancel occurs (may result in some race conditions though).
The following is a sample of my implementation. Is there something I
am doing wrong?
connection.onSubscribed = function(channel, subscription) {
self._hookbox.subscription[channel] = subscription;
}
...
$(".unsubscribe").bind("click", function() {
var channel = $(this).prop("channel");
self._hookbox.subscription[channel].canceled = false; // my hack
self._hookbox.subscription[channel].cancel();
});
Thanks.