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?