void approved() {
        if (state == State.subscribed) {
            // Do nothing
            return;
        }

        Log.trace("Subscription has been approved by a node owner. Toggling state from {} to {}.", state, State.subscribed);
        state = State.subscribed;

        if (savedToDB) {
            // Update the subscription in the backend store
            XMPPServer.getInstance().getPubSubModule().getPersistenceProvider().updateSubscription(node, this);
        }

        // Send last published item (if node is leaf node and subscription status is ok)
        if (node.isSendItemSubscribe() && isActive()) {
            PublishedItem lastItem = node.getLastPublishedItem();
            if (lastItem != null) {
                Log.trace("Send last published item '{}' as node is leaf node and subscription status is ok.", lastItem.getID());
                sendLastPublishedItem(lastItem);
            }
        }
    }
The subscription has been approved by a node owner. The subscription is now active so
the subscriber is now allowed to get event notifications.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/NodeSubscription.java