Please review & consider, if possible to automatically enable receivePresenceEvents: true for channels with suffix -pnpres, like so:
// Current usage
const subscriptionSet = pubnub.subscriptionSet({
channels: ['ch1', 'ch2'],
subscriptionOptions: { receivePresenceEvents: true }
});
// Possible variation to reduce code base
const subscriptionSet = 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.