mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-14 09:01:08 +01:00
Improve PubSub API
Use Manager pattern for PubSubManager. Also improve the API of ServiceDiscoverManager.
This commit is contained in:
parent
9e351f0535
commit
001e824fb9
16 changed files with 368 additions and 140 deletions
|
|
@ -283,11 +283,7 @@ public class MultipleRecipientManager {
|
|||
*/
|
||||
private static DomainBareJid getMultipleRecipienServiceAddress(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection);
|
||||
List<DomainBareJid> services = sdm.findServices(MultipleAddresses.NAMESPACE, true, true);
|
||||
if (services.size() > 0) {
|
||||
return services.get(0);
|
||||
}
|
||||
return null;
|
||||
return sdm.findService(MultipleAddresses.NAMESPACE, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue