public void send(Packet packet) {
        if (packet == null) {
            return;
        }

        Log.debug("Send stanza {} to nickname {} and userJid {}", packet.toXML(), getNickname(), userJid);

        if (getNickname() == null) { // If this is a 'room self-representing occupant'.
            Log.debug("Nickname is null, assuming room is sender of the stanza");
            getChatRoom().send(packet, this);
            return;
        }

        if (this.isRemoteFmuc()) {
            // Sending stanzas to individual occupants that are on remote FMUC nodes defeats the purpose of FMUC, which is to reduce message. This reduction is based on sending data just once, and have it 'fan out' on the remote node (as opposed to sending each occupant on that node a distinct stanza from this node).
            Log.warn( "Sending data directly to an entity ({}) on a remote FMUC node. Instead of individual messages, we expect data to be sent just once (and be fanned out locally by the remote node).", this, new Throwable() );

            // Check if stanza needs to be enriched with FMUC metadata.
            augmentOutboundStanzaWithFMUCData(packet);
        }

        packet.setTo(userJid);


        XMPPServer.getInstance().getPacketRouter().route(packet);
    }
Sends a packet to the user.

Note that sending a packet can modify it (notably, the 'to' address can be changed). If this is undesired (for
example, because post-processing should not expose the modified 'to' address), then a copy of the original
stanza should be provided as an argument to this method.

@param packet The packet to send
@see <a href="https://igniterealtime.atlassian.net/browse/OF-2163">issue OF-2163</a>
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCOccupant.java