1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 22:12:05 +01:00

Minor fix to search service for JEP 55

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3000 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro 2005-10-30 00:39:49 +00:00 committed by derek
parent 6a7f7826cd
commit 65d5376606
2 changed files with 13 additions and 4 deletions

View file

@ -332,6 +332,10 @@ public class FormField {
return value; return value;
} }
public String toString(){
return getLabel();
}
public String toXML() { public String toXML() {
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append("<option"); buf.append("<option");

View file

@ -93,12 +93,17 @@ public class UserSearchManager {
DiscoverItems items = discoManager.discoverItems(con.getServiceName()); DiscoverItems items = discoManager.discoverItems(con.getServiceName());
for (Iterator it = items.getItems(); it.hasNext();) { for (Iterator it = items.getItems(); it.hasNext();) {
DiscoverItems.Item item = (DiscoverItems.Item) it.next(); DiscoverItems.Item item = (DiscoverItems.Item) it.next();
DiscoverInfo info = discoManager.discoverInfo(item.getEntityID()); try {
if (info.containsFeature("jabber:iq:search")) { DiscoverInfo info = discoManager.discoverInfo(item.getEntityID());
searchServices.add(item.getEntityID()); if (info.containsFeature("jabber:iq:search")) {
searchServices.add(item.getEntityID());
}
}
catch (XMPPException e) {
// No info found.
break;
} }
} }
return searchServices; return searchServices;
} }
} }