Each SDK has its unique API to disable leave events:


JavaScript SDK

var pubnub = new PubNub({
    subscribeKey: "mySubscribeKey",
    publishKey: "myPublishKey",
    suppressLeaveEvents: true
});


iOS - Swift

let pnconfig = PNConfiguration(publishKey: "myPublishKey", subscribeKey: "mySubscribeKey")
pnconfig.suppressLeaveEvents = true
self.client = PubNub.clientWithConfiguration(pnconfig)
self.client.addListener(self)


iOS - Objective-C

PNConfiguration *pnconfig = [PNConfiguration configurationWithPublishKey:@"myPublishKey"  
                                             subscribeKey:@"mySubscribeKey"];
pnconfig. suppressLeaveEvents = YES
self.client = [PubNub clientWithConfiguration:pnconfig];
[self.client addListener:self];


Android

PNConfiguration pnconfig = new PNConfiguration();
pnconfig.setSubscribeKey("mySubcribekey");
pnconfig.setPublishKey("myPublishkey");
pnconfig.setSupressLeaveEvents(true);
PubNub pubnub = new PubNub(pnconfig);


See the SDK Docs page for other SDKs.