Abhi
Abhi

Reputation: 4261

How can I know I'm online, in ejabberd

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?

Upvotes: 0

Views: 74

Answers (1)

Mickaël Rémond
Mickaël Rémond

Reputation: 9055

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.

Upvotes: 1

Related Questions