Is there any way using Jabber (WebEx Messenger) sdk/api to search all people who has a specific presence. For example the list of all people who have the "away" custom status "eating" Thank you
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Try something like this (the groups part probably isn't necessary - you can try to remove it):
var groups = this.client.entitySet.getAllGroups(); var arrayLength = groups.length; for (i = 0; i < arrayLength; i++) { var thisGroup = groups[i]; this.client.entitySet.each(function(entity) { if (entity instanceof jabberwerx.RosterContact && ($.inArray(thisGroup, groups) != -1)) { try { presence = entity.getPrimaryPresence(); if (presence != null) { var show = presence.getType() || presence.getShow() || "available"; var status = presence.getStatus(); var priority = presence.getPriority(); switch (show) { case "available": break; case "away": break; case "xa": break; default: break; } } } catch (ex) { log("JWA", "execption in presence " + ex); } } }); }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So it doesn't matter if Jabber is registered to the WebEx cloud or on-prem?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No, it doesn't matter. The difference is how you log in to webex vs. on-prem. The Javascript functions work the same way on both. After you've logged in, the differences will show up in the entitySet, but they're functionally the same for what you want to do.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi there,
I would suggest checking the following forum for this issue as the WebEx Developer forum only covers the XML, URL, NBR, TSP and WebACD APIs. Apologies for the inconvenience.
Kasey
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.