You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Let's define a subscription set and add some channels with `-pnpres` for presence listening. letregularSubscriptionSet=pubnub.subscriptionSet({channels: ['channel-1-pnpres','channel-2-pnpres','channel-3','channel-4'],});// Subscribe to setregularSubscriptionSet.subscribe();// Check subscriptionsconsole.log('Subscribed channels',pubnub.getSubscribedChannels());// Returned ['channel-1-pnpres', 'channel-2-pnpres', 'channel-3', 'channel-4']// Unsubscribe from set regularSubscriptionSet.unsubscribe();console.log('Subscribed channels',pubnub.getSubscribedChannels());// Returned ['channel-1-pnpres', 'channel-2-pnpres']// Call depreciated methodpubnub.unsubscribe({channels: ['channel-1-pnpres','channel-2-pnpres']})console.log('Subscribed channels',pubnub.getSubscribedChannels());// Returned []
In other words, new SubscriptionSet functionality doesn't unsubscribe from channels with -pnpres, even it's bootstrapped to pubnub.channel().
Old style pubnub.unsubscribe() works as expected.
Did I miss something?
The text was updated successfully, but these errors were encountered:
@roman-rr thank you for reporting back about the issue.
I can see in the code special -pnpres channels treatment, but need to consult the team about why this decision has been made. It should list of channels and groups as-is, but maybe some factors need to be considered.
Release is rolling out as a temporarily backward-compatible solution.
The idea behind the original implementation was to use the receivePresenceEvents subscription configuration option to instruct the subscription object to provide -pnpres - this way all works as expected. When they have passed manually, you will get into trouble.
Please correct me, if not the bag.
In other words, new
SubscriptionSet
functionality doesn't unsubscribe from channels with-pnpres
, even it's bootstrapped topubnub.channel()
.Old style
pubnub.unsubscribe()
works as expected.Did I miss something?
The text was updated successfully, but these errors were encountered: