private void processPresenceUpdate(
        @Nonnull final Presence packet,
        @Nonnull final MUCRoom room,
        @Nonnull final MUCOccupant preExistingOccupantData )
    {
        if ( Presence.Type.unavailable == packet.getType() )
        {
            Log.trace("Occupant '{}' of room '{}' is leaving.", preExistingOccupantData.getUserAddress(), room.getName());
            // TODO Consider that different nodes can be creating and processing this presence at the same time (when remote node went down)
            preExistingOccupantData.setPresence(packet);
            room.leaveRoom(preExistingOccupantData);
        }
        else
        {
            Log.trace("Occupant '{}' of room '{}' changed its availability status.", preExistingOccupantData.getUserAddress(), room.getName());
            room.presenceUpdated(preExistingOccupantData, packet);
        }
    }
Process a presence status update for a user.

@param packet                  The stanza to process
@param room                    The room that the stanza was addressed to.
@param preExistingOccupantData The occupant data of this user in the addressed room prior to processing of this stanza.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java