Closed sylvesterdsouza closed 5 years ago
How do I get a list of channels that a socket was subscribed to on disconnect or unsubscribe?
I tried socket.subscriptions() but it does not return any data.
socket.on('unsubscribe', function (object) { console.log("socket id : " + socket.id + " Un-Subscribed from channels : " + socket.subscriptions() ); });
Figured it out, the below code works for me
socket.on('unsubscribe', function (channelname) { console.log("socket id : " + socket.id + " Un-Subscribed from : " +channelname ); });
How do I get a list of channels that a socket was subscribed to on disconnect or unsubscribe?
I tried socket.subscriptions() but it does not return any data.
socket.on('unsubscribe', function (object) { console.log("socket id : " + socket.id + " Un-Subscribed from channels : " + socket.subscriptions() ); });