[PATCH] Node.getAllSubscriptions (#owner namespace)

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)

Fixed with https://github.com/igniterealtime/Smack/commit/5c086eeefa2c4470f3295d26e7cfc1db9 4e1e2ab Sorry it took so long :stuck_out_tongue:

(I actually fixed it without knowing about this patch, that’s why the commit is not based on your patch. I just stumbled about this post.)