Strange presence behavior

Hi,
I wrote a minimal client. It displays the presence status of buddies. In my small test fleet, we observe that some devices are reporting a presence of an offline one as other do not!
How does it come that some devices receive “1” some “0” and some nothing?
Is it some sort of split brain scenario for the DHT?
And when is “2” the response (I saw it only once for a short time)?

1 Like

1 means “present but not connected”, 2 means “peer-to-peer connected”.

From the code:
enum class PresenceState : int { DISCONNECTED = 0, AVAILABLE, CONNECTED };

Note that the client should subscribe to the contact presence using the subscribeBuddy API.

1 Like

my test fleet has 12 edge devices and 12 DHT nodes in the cloud; presences are received because each device did a subscribeBuddy against each others in a mesh fashion.

even when in talk on same physical LAN, presence remains “1” when I would expect it to be “2”.

and simultaneously some devices receive “1” for some presences while others receive “0” for same one (target device is off-line)

Edit:

Presence becomes “2” is a conf_mgr.sendTextMessage() is used but not if a call_mgr.placeCall() is. Why this difference as both are p2p?

and simultaneously some devices receive “1” for some presences while others receive “0” for same one (target device is off-line)

This presence randomness makes my users unhappy as they cannot rely upon presence to expect a correspondent to pick-up a call (we do only voice calls with jami). I receive most support complains about that topic…