The community forums are in BETA and closed to the public.

invoking here_now inside the presence event returns uncomplete uuids list

Hi, We noticed that invoking the here_now inside the presence (or the connect) callback, does not return the expected list of uuids. From our tests, it is necessary to wait > 1 sec in order to have the correct list of uuids present in the channel.

Is this behaviour expected? Is polling here_now the only way to have a consistent list of uuid connected?

Salvatore, the issue is that here_now will never be 100% accurate because you call it, it returns and the more subscribers can join as that returns.

To have realtime accurate occupancy, you need to implement the presence callback in the subscribe and for every join: +1. And for every leave or timeout: -1.

And the connect callback only fires when you subscribe to the first channel. So if you subscribe to another channel while already subscribed to the other channel, it will not get called, so use connect with with this in mind.

Login or Signup to post a comment