mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-23 06:42: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:
parent
6a7f7826cd
commit
65d5376606
2 changed files with 13 additions and 4 deletions
|
@ -332,6 +332,10 @@ public class FormField {
|
|||
return value;
|
||||
}
|
||||
|
||||
public String toString(){
|
||||
return getLabel();
|
||||
}
|
||||
|
||||
public String toXML() {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
buf.append("<option");
|
||||
|
|
|
@ -93,12 +93,17 @@ public class UserSearchManager {
|
|||
DiscoverItems items = discoManager.discoverItems(con.getServiceName());
|
||||
for (Iterator it = items.getItems(); it.hasNext();) {
|
||||
DiscoverItems.Item item = (DiscoverItems.Item) it.next();
|
||||
try {
|
||||
DiscoverInfo info = discoManager.discoverInfo(item.getEntityID());
|
||||
if (info.containsFeature("jabber:iq:search")) {
|
||||
searchServices.add(item.getEntityID());
|
||||
}
|
||||
}
|
||||
catch (XMPPException e) {
|
||||
// No info found.
|
||||
break;
|
||||
}
|
||||
}
|
||||
return searchServices;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue