void sendSubscriptionState(IQ originalRequest) {
        IQ result = IQ.createResultIQ(originalRequest);
        Element child = result.setChildElement("pubsub", "http://jabber.org/protocol/pubsub");
        Element entity = child.addElement("subscription");
        if (!node.isRootCollectionNode()) {
            entity.addAttribute("node", node.getUniqueIdentifier().getNodeId());
        }
        entity.addAttribute("jid", getJID().toString());
        if (node.isMultipleSubscriptionsEnabled()) {
            entity.addAttribute("subid", getID());
        }
        entity.addAttribute("subscription", getState().name());
        Element subscribeOptions = entity.addElement("subscribe-options");
        if (node.isSubscriptionConfigurationRequired() && isConfigurationPending()) {
            subscribeOptions.addElement("required");
        }

        Log.trace("Send subscription state in response to a request from '{}'", result.getTo());
        node.getService().send(result);
    }
Sends the current subscription status to the user that tried to create a subscription to
the node. The subscription status is sent to the subsciber after the subscription was
created or if the subscriber tries to subscribe many times and the node does not support
multpiple subscriptions.

@param originalRequest the IQ packet sent by the subscriber to create the subscription.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/NodeSubscription.java