void sendLastPublishedItem(@Nonnull final PublishedItem publishedItem) {
        // Check to see if we've been disabled
        if (JiveGlobals.getBooleanProperty("xmpp.pubsub.disable-delayed-delivery", false)) {
            Log.trace("Not sending last published item notification for item '{}', as that has been disabled by configuration.", publishedItem.getID());
            return;
        }

        // Check if the published item can be sent to the subscriber
        if (!canSendPublicationEvent(publishedItem.getNode(), publishedItem)) {
            Log.trace("Not sending last published item notification for item '{}', as publication events cannot be sent.", publishedItem.getID());
            return;
        }
        // Send event notification to the subscriber
        Message notification = new Message();
        Element event = notification.getElement().addElement("event", "http://jabber.org/protocol/pubsub#event");
        Element items = event.addElement("items");
        items.addAttribute("node", node.getUniqueIdentifier().getNodeId());
        Element item = items.addElement("item");
        if (((LeafNode) node).isItemRequired()) {
            item.addAttribute("id", publishedItem.getID());
        }
        if (node.isPayloadDelivered() && publishedItem.getPayload() != null) {
            item.add(publishedItem.getPayload().createCopy());
        }
        // Add a message body (if required)
        if (isIncludingBody()) {
            final Locale preferredLocale = SessionManager.getInstance().getLocaleForSession(jid);
            notification.setBody(LocaleUtils.getLocalizedString("pubsub.notification.message.body", preferredLocale));
        }
        // Include date when published item was created
        notification.getElement().addElement("delay", "urn:xmpp:delay")
                .addAttribute("stamp", XMPPDateTimeFormat.format(publishedItem.getCreationDate()));

        // Send the event notification to the subscriber
        Log.trace("Sending last published item notification for item '{}'.", publishedItem.getID());
        node.getService().sendNotification(node, notification, jid);
    }
Sends an event notification for the last published item to the subscriber. If
the subscription has not yet been authorized or is pending to be configured then
no notification is going to be sent.<p>

Depending on the subscription configuration the event notification may or may not have
a payload, may not be sent if a keyword (i.e. filter) was defined and it was not matched.

<p>Sending the last published item can also be entirely disabled by setting
{@code xmpp.pubsub.disable-delayed-delivery} to {@code <true}.</p>

@param publishedItem the last item that was published to the node.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/NodeSubscription.java