private void afterJoinSendOccupants( @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 current occupants to joining node '{}'.", room.getJID(), joiningPeer );

        for ( final MUCOccupant occupant : room.getOccupants() ) {
            if ( occupant.getReportedFmucAddress() != null && occupant.getReportedFmucAddress().asBareJID().equals( joiningPeer ) ) {
                Log.trace("(room: '{}'): Skipping occupant '{}' as that originates from the joining node.", room.getJID(), occupant );
                continue;
            }

            // TODO can we use occupant.getPresence() for this?
            // TODO do we need to worry about who we're exposing data to?
            final Presence presence = new Presence();
            presence.setFrom( occupant.getOccupantJID() );
            presence.setTo( joiningPeer );
            final Presence enriched = enrichWithFMUCElement( presence, occupant );
            final Element xitem = enriched.addChildElement( "x", "http://jabber.org/protocol/muc#user" ).addElement( "item" );
            xitem.addAttribute( "affiliation", occupant.getAffiliation().toString() );
            xitem.addAttribute( "role", occupant.getRole().toString() );
            xitem.addAttribute( "jid", occupant.getOccupantJID().toString() );

            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