private void processNonOccupantMessage(
        @Nonnull final Message packet,
        @Nonnull final MUCRoom room )
    {
        boolean declinedInvitation = false;
        Element userInfo = null;
        if ( Message.Type.normal == packet.getType() )
        {
            // An user that is not an occupant could be declining an invitation
            userInfo = packet.getChildElement("x", "http://jabber.org/protocol/muc#user");
            if ( userInfo != null && userInfo.element("decline") != null )
            {
                // A user has declined an invitation to a room
                // WARNING: Potential fraud if someone fakes the "from" of the
                // message with the JID of a member and sends a "decline"
                declinedInvitation = true;
            }
        }

        if ( declinedInvitation )
        {
            Log.debug("Processing room invitation declination sent by '{}' to room '{}'.", packet.getFrom(), room.getName());
            final Element info = userInfo.element("decline");
            room.sendInvitationRejection(
                new JID(info.attributeValue("to")),
                info.elementTextTrim("reason"),
                packet.getFrom());
        }
        else
        {
            Log.debug("Rejecting message stanza sent by '{}' to room '{}': Sender is not an occupant of the room: {}", packet.getFrom(), room.getName(), packet.toXML());
            sendErrorPacket(packet, PacketError.Condition.not_acceptable, "You are not in the room.");
        }
    }
Processes a Message stanza that was sent by a user that's not in the room.

Only declined invitations (to join a room) are acceptable messages from users that are not in the room. Other
messages are responded to with an error.

@param packet   The stanza to process
@param room     The room that the stanza was addressed to.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java