private void afterJoinSendSubject( @Nonnull final JID joiningPeer )
    {
        if ( !joiningPeer.asBareJID().equals(joiningPeer) ) {
            throw new IllegalArgumentException( "Expected argument 'joiningPeer' to be a bare JID, but it was not: " + joiningPeer );
        }

        Log.trace("(room: '{}'): Sending subject to joining node '{}'.", room.getJID(), joiningPeer );

        // TODO can org.jivesoftware.openfire.muc.spi.MUCRoom.sendRoomSubjectAfterJoin be re-used?
        final MUCRoomHistory roomHistory = room.getRoomHistory();
        Message roomSubject = roomHistory.getChangedSubject();
        if ( roomSubject != null ) {
            roomSubject = roomSubject.createCopy(); // OF-2163: Prevent accidental modifications to the original.
        } else {
            roomSubject = new Message();
            roomSubject.setFrom(this.room.getJID()); // This might break FMUC, as it does not include the nickname of the author of the subject.
            roomSubject.setTo(joiningPeer);
            roomSubject.setType(Message.Type.groupchat);
            roomSubject.setID(UUID.randomUUID().toString());
            final Element subjectEl = roomSubject.getElement().addElement("subject");
            if ( room.getSubject() != null && !room.getSubject().isEmpty() )
            {
                subjectEl.setText(room.getSubject());
            }
        }

        final JID originalAuthorUserAddress = roomSubject.getFrom();
        final JID originalAuthorRoleAddress = new JID( room.getJID().getNode(), room.getJID().getDomain(), originalAuthorUserAddress.getResource() );

        final Message enriched = enrichWithFMUCElement( roomSubject, originalAuthorUserAddress );

        // Correct the addressing of the stanza.
        enriched.setFrom( originalAuthorRoleAddress );
        enriched.setTo( joiningPeer );

        XMPPServer.getInstance().getPacketRouter().route( enriched );
    }
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