public List getSubscriptions()
throws XMPPException
{
PubSub reply = (PubSub)sendPubsubPacket(Type.GET, new NodeExtension(PubSubElementType.SUBSCRIPTIONS, getId()));
SubscriptionsExtension subElem = (SubscriptionsExtension)reply.getExtension(PubSubElementType.SUBSCRIPTIONS);
return subElem.getSubscriptions();
}
It is currently impossible to get all subscriptions of a node (XEP-0060 8.8.1.1).
Attached is an initial patch to add a getAllSubscriptions() method which uses the #owner. I’m still getting a NPE on return, but that’s due to a server sending the wrong result namespace…
99-PubSubNode-getAllSubscriptions.patch.zip (785 Bytes)