@Override
    public boolean canDeliver(@Nonnull final Packet stanza)
    {
        final boolean result;
        PrivacyList list = getActiveList();
        if (list != null) {
            // If a privacy list is active then make sure that the packet is not blocked
            result = !list.shouldBlockPacket(stanza);
        }
        else {
            list = getDefaultList();
            // There is no active list so check if there exists a default list and make
            // sure that the packet is not blocked
            result = list == null || !list.shouldBlockPacket(stanza);
        }

        if (!result) {
            returnPrivacyListErrorToSender(stanza);
        }
        return result;
    }
Returns true if the specified packet must not be blocked based on the active or default
privacy list rules. The active list will be tried first. If none was found then the
default list is going to be used. If no default list was defined for this user then
allow the packet to flow.

@param stanza the packet to analyze if it must be blocked.
@return true if the specified packet must *not* be blocked.
xmppserver/src/main/java/org/jivesoftware/openfire/session/LocalClientSession.java