public static boolean isFMUCJoinRequest( @Nonnull Packet stanza )
    {
        final Element fmuc = stanza.getElement().element(FMUC);
        if (fmuc == null) {
            throw new IllegalArgumentException( "Provided stanza must have an 'fmuc' child element (but does not).");
        }

        final boolean result =
            (stanza instanceof Presence) &&
                stanza.getElement().element( QName.get( "x", "http://jabber.org/protocol/muc") ) != null &&
                stanza.getElement().element( QName.get( "x", "http://jabber.org/protocol/muc#user") ) != null;

        Log.trace( "Stanza from '{}' was determined to {} a stanza containing a FMUC join request.", stanza.getFrom(), result ? "be" : "not be" );
        return result;
    }
Sends a stanza back to a remote, joining FMUC node that represents acceptance of a FMUC join request.

@param joinRequest The request to join that is being accepted.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/FMUCHandler.java