0
votes

I have configured ejabberd to work in multiple tabs by passing different resource for each connection in each tab (as mentioned here by rraptorr). And it works fine in each tab.

The problem now is, if I close 1 tab, then a presence offline stanza is sent to other users saying that I'm offline, where as I'm online in other tabs with different resource.

Question: Is there a way to detect if I'm online, using my jid?

1

1 Answers

1
votes

XMPP is a multi resources / multi-connection protocol. A client is not supposed to take only the last presence receive into account but keep a list of all connected resource for his contact. That way, when a presence unavailable is received, it need to make sure only the associated resource is mark offline, not all resources from the user.