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
Please review & consider, if possible to automatically enable receivePresenceEvents: true for channels with suffix -pnpres, like so:
// Current usageconstsubscriptionSet=pubnub.subscriptionSet({channels: ['ch1','ch2'],subscriptionOptions: {receivePresenceEvents: true}});// Possible variation to reduce code baseconstsubscriptionSet=pubnub.subscriptionSet({channels: ['ch1-pnpres','ch2-pnpres']});
And then both cases will have flag receivePresenceEvents: true, which can reduce code double-tube for presence/non-presence channels in client side.
The text was updated successfully, but these errors were encountered:
I'm not really sure what you want to achieve. receivePresenceEvents - this is a flag which internally used to generate -pnpres versions. In first case set will contain: ch1, ch2, ch1-pnpres and ch2-pnpres and on subscribe updates will be received from all of them (real-time messages and presence updates). Second example will only listen for presence updates.
Please review & consider, if possible to automatically enable
receivePresenceEvents: true
for channels with suffix-pnpres
, like so:And then both cases will have flag
receivePresenceEvents: true
, which can reduce code double-tube for presence/non-presence channels in client side.The text was updated successfully, but these errors were encountered: