fix service discovery has identity

This commit is contained in:
kosyak 2023-08-15 01:23:18 +02:00
parent fee1a67332
commit 5ce1e80e73

View file

@ -168,15 +168,19 @@ public class ServiceDiscoveryResult {
return this.features;
}
public boolean hasIdentity(String category, String type) {
public Identity getIdentity(String category, String type) {
for (Identity id : this.getIdentities()) {
if ((category == null || id.getCategory().equals(category)) &&
(type == null || id.getType().equals(type))) {
return true;
return id;
}
}
return false;
return null;
}
public boolean hasIdentity(String category, String type) {
return getIdentity(category, type) != null;
}
public String getExtendedDiscoInformation(String formType, String name) {