public static JID getFMUCFromJID( @Nonnull final Packet stanza )
    {
        final Element fmuc = stanza.getElement().element(FMUC);
        if ( fmuc == null ) {
            throw new IllegalArgumentException( "Argument 'stanza' should be an FMUC stanza, but it does not appear to be: it is missing the FMUC child element." );
        }

        final String fromValue = fmuc.attributeValue( "from" );

        if ( fromValue == null ) {
            throw new IllegalArgumentException( "Argument 'stanza' should be a valid FMUC stanza, but it does not appear to be: it is missing a 'from' attribute value in the FMUC child element." );
        }

        final JID userJID = new JID( fromValue );
        return userJID;
    }
Parses the JID from an FMUC stanza.

More specifically, this method returns the JID representation of the 'from' attribute value of the 'fmuc' child
element in the stanza. A runtime exception is thrown when no such value exists, or when that value is not a
valid JID.

@param stanza An FMUC stanza
@return A JID.
@throws RuntimeException when no valid JID value is found in the 'from' attribute of the FMUC child element.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/FMUCHandler.java