mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 22:32:06 +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:
parent
6a7f7826cd
commit
65d5376606
2 changed files with 13 additions and 4 deletions
|
@ -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");
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue