Shi Jie Ng | Hi Haji, You will need to subscribe to the entities onPresenceChanged events. 1. Global Event Listener after jabberwerx.Client has been connected ---------- Following Developer Guide.html in the package ------------ // The example places the name of the Call Back in quotation marks. Remove the quotation Marks. //jabberwerx.globalEvents.bind("presenceReceived", "onPresenceReceived"); // This is the code you should be using. jabberwerx.globalEvents.bind("presenceReceived", onPresenceReceived); // callback method for the 'presenceReceived' event function onPresenceReceived(event) { // get the associated jabberwerx.Presence object data var presence = event.data; var type = presence.getType(); var show = presence.getShow(); var status = presence.getStatus(); var priority = String(presence.getPriority()); var fromJID = presence.getFromJID(); var toJID = presence.getToJID(); } Regards, Shi Jie |
| Please sign in to flag this as inappropriate. |