In PUBNUB, the event join event will light up. If the user has already calibrated with the channel

Let's assume that the same uuid is subscribed by () channels, but they get time from different browsers

Scenario

Up to 10 minutes with Chrome

subscribe with channel => channel_1 with uuid => abcValue

After 5 minutes with Mozilla

subscribe with channel => channel_1 with uuid => abcValue

 var pubnub = PUBNUB.init({
            publish_key: "demo",
            subscribe_key: "demo",
            uuid:"abcValue"
        });
pubnub.subscribe({
            channel:'channel_1',
            presence:function(value, envelope, source_channel){
        if( value.action ==="join" && value.uuid === 'abcValue' )
         console.log('Join Called')
});

      

Will Join Called be registered twice or not?

+3


source to share


1 answer


The browser is not a factor.

and no, you don't get two join notifications when you use the same uuid, 'abcValue' from Chrome and Firefox, only the first browser (Chrome in this case) logs the event.



Since "abcValue" never went away, and joining "abcValue" after "abcValue" is already connected means you won't get another join.

If you assign a uuid for each connection (so each browser has a different uuid), you should see two separate merge events.

0


source







All Articles