@Override
    public void deliver(Packet queueOrPushStanza) throws UnauthorizedException {
        // Queue this stanza, possibly returning it immediately in line with any previously queued stanzas if this
        // stanza needs to be pushed to the client immediately.
        final List<Packet> stanzasToPush = csiManager.queueOrPush(queueOrPushStanza);

        if (stanzasToPush.isEmpty()) {
            return;
        }

        // When stream management is enabled, deliver and record stanzas under a mutex. If it's not enabled, don't
        // acquire the lock to reduce lock contention (OF-2921).
        if (!streamManager.isEnabled()) {
            // Push stanzas to the client.
            for (final Packet stanzaToPush : stanzasToPush) {
                if (conn != null) {
                    conn.deliver(stanzaToPush);
                }
            }
        } else {
            synchronized (streamManager) {
                // Push stanzas to the client.
                for (final Packet stanzaToPush : stanzasToPush) {
                    if (conn != null) {
                        conn.deliver(stanzaToPush);
                    }
                    streamManager.sentStanza(stanzaToPush);
                }
            }
        }
    }
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