private void cancelPresenceSubscriptions() {
        for (NodeSubscription subscription : getSubscriptions()) {
            if (isPresenceBasedDelivery() || !subscription.getPresenceStates().isEmpty()) {
                getService().presenceSubscriptionNotRequired(this, subscription.getOwner());
            }
        }
    }
Unsubscribe from affiliates presences if node is only sending notifications to
only users or only unsubscribe from those subscribers that configured their
subscription to send notifications based on their presence show value.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/Node.java