Merge branch 'master' into feature/add-talk-to-help

This commit is contained in:
Kalila 2021-07-15 17:34:29 -04:00 committed by GitHub
commit 8e4a0f8880
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 124 additions and 76 deletions

View file

@ -25,6 +25,8 @@ env:
# WIN32 specific variables # WIN32 specific variables
PreferredToolArchitecture: X64 PreferredToolArchitecture: X64
# Ensure XZ always runs with muticore support
XZ_OPT: -T0
jobs: jobs:
build: build:
@ -140,6 +142,24 @@ jobs:
working-directory: ${{runner.workspace}}/build working-directory: ${{runner.workspace}}/build
shell: bash shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DVCPKG_BUILD_TYPE=release $CMAKE_EXTRA run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DVCPKG_BUILD_TYPE=release $CMAKE_EXTRA
- name: Compress cmake logs
if: always()
shell: bash
run: |
if [ "${{ matrix.os }}" == "macOS-latest" ]; then
TAR=gtar
else
TAR=tar
fi
find "$HOME/vircadia-files/vcpkg" -name '*log' -type f -print0 | $TAR --null --force-local -T - -c --xz -v -f "${{ runner.workspace }}/cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz"
- name: Archive cmake logs
if: always()
uses: actions/upload-artifact@v2
with:
name: cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz
path: ${{ runner.workspace }}/cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz
if-no-files-found: error
- name: Build Application - name: Build Application
if: matrix.build_type == 'full' || matrix.build_type == 'client' if: matrix.build_type == 'full' || matrix.build_type == 'client'
working-directory: ${{runner.workspace}}/build working-directory: ${{runner.workspace}}/build
@ -231,4 +251,4 @@ jobs:
if [[ "${{ matrix.build_type }}" == "android" ]]; then if [[ "${{ matrix.build_type }}" == "android" ]]; then
cd $GITHUB_WORKSPACE/android cd $GITHUB_WORKSPACE/android
fi fi
$PYTHON_EXEC "$GITHUB_WORKSPACE/tools/ci-scripts/upload_to_publish_server.py" $PYTHON_EXEC "$GITHUB_WORKSPACE/tools/ci-scripts/upload_to_publish_server.py"

View file

@ -57,7 +57,7 @@ MESSAGE(STATUS "GLES_OPTION: ${GLES_OPTION}")
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/macros/TargetPython.cmake") include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/macros/TargetPython.cmake")
target_python() target_python()
if (WIN32 AND NOT HIFI_ANDROID) if (WIN32 AND NOT HIFI_ANDROID AND NOT (CMAKE_GENERATOR STREQUAL "Ninja"))
# Force x64 toolset # Force x64 toolset
set(CMAKE_GENERATOR_TOOLSET "host=x64" CACHE STRING "64-bit toolset" FORCE) set(CMAKE_GENERATOR_TOOLSET "host=x64" CACHE STRING "64-bit toolset" FORCE)
endif() endif()

View file

@ -4004,7 +4004,7 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
parser.parse(arguments()); parser.parse(arguments());
if (parser.isSet(urlOption)) { if (parser.isSet(urlOption)) {
QUrl url = QUrl(parser.value(urlOption)); QUrl url = QUrl(parser.value(urlOption));
if (url.scheme() == URL_SCHEME_HIFIAPP) { if (url.scheme() == URL_SCHEME_VIRCADIAAPP) {
Setting::Handle<QVariant>("startUpApp").set(url.path()); Setting::Handle<QVariant>("startUpApp").set(url.path());
} else { } else {
addressLookupString = url.toString(); addressLookupString = url.toString();
@ -7285,7 +7285,7 @@ void Application::clearDomainOctreeDetails(bool clearAll) {
void Application::domainURLChanged(QUrl domainURL) { void Application::domainURLChanged(QUrl domainURL) {
// disable physics until we have enough information about our new location to not cause craziness. // disable physics until we have enough information about our new location to not cause craziness.
setIsServerlessMode(domainURL.scheme() != URL_SCHEME_HIFI); setIsServerlessMode(domainURL.scheme() != URL_SCHEME_VIRCADIA);
if (isServerlessMode()) { if (isServerlessMode()) {
loadServerlessDomain(domainURL); loadServerlessDomain(domainURL);
} }
@ -7294,7 +7294,7 @@ void Application::domainURLChanged(QUrl domainURL) {
void Application::goToErrorDomainURL(QUrl errorDomainURL) { void Application::goToErrorDomainURL(QUrl errorDomainURL) {
// disable physics until we have enough information about our new location to not cause craziness. // disable physics until we have enough information about our new location to not cause craziness.
setIsServerlessMode(errorDomainURL.scheme() != URL_SCHEME_HIFI); setIsServerlessMode(errorDomainURL.scheme() != URL_SCHEME_VIRCADIA);
if (isServerlessMode()) { if (isServerlessMode()) {
loadErrorDomain(errorDomainURL); loadErrorDomain(errorDomainURL);
} }
@ -7658,7 +7658,7 @@ bool Application::canAcceptURL(const QString& urlString) const {
QUrl url(urlString); QUrl url(urlString);
if (url.query().contains(WEB_VIEW_TAG)) { if (url.query().contains(WEB_VIEW_TAG)) {
return false; return false;
} else if (urlString.startsWith(URL_SCHEME_HIFI)) { } else if (urlString.startsWith(URL_SCHEME_VIRCADIA)) {
return true; return true;
} }
QString lowerPath = url.path().toLower(); QString lowerPath = url.path().toLower();
@ -7673,7 +7673,7 @@ bool Application::canAcceptURL(const QString& urlString) const {
bool Application::acceptURL(const QString& urlString, bool defaultUpload) { bool Application::acceptURL(const QString& urlString, bool defaultUpload) {
QUrl url(urlString); QUrl url(urlString);
if (url.scheme() == URL_SCHEME_HIFI) { if (url.scheme() == URL_SCHEME_VIRCADIA) {
// this is a hifi URL - have the AddressManager handle it // this is a hifi URL - have the AddressManager handle it
QMetaObject::invokeMethod(DependencyManager::get<AddressManager>().data(), "handleLookupString", QMetaObject::invokeMethod(DependencyManager::get<AddressManager>().data(), "handleLookupString",
Qt::AutoConnection, Q_ARG(const QString&, urlString)); Qt::AutoConnection, Q_ARG(const QString&, urlString));

View file

@ -265,7 +265,7 @@ int main(int argc, const char* argv[]) {
if (socket.waitForConnected(LOCAL_SERVER_TIMEOUT_MS)) { if (socket.waitForConnected(LOCAL_SERVER_TIMEOUT_MS)) {
if (parser.isSet(urlOption)) { if (parser.isSet(urlOption)) {
QUrl url = QUrl(parser.value(urlOption)); QUrl url = QUrl(parser.value(urlOption));
if (url.isValid() && (url.scheme() == URL_SCHEME_HIFI || url.scheme() == URL_SCHEME_HIFIAPP if (url.isValid() && (url.scheme() == URL_SCHEME_VIRCADIA || url.scheme() == URL_SCHEME_VIRCADIAAPP
|| url.scheme() == HIFI_URL_SCHEME_HTTP || url.scheme() == HIFI_URL_SCHEME_HTTPS || url.scheme() == HIFI_URL_SCHEME_HTTP || url.scheme() == HIFI_URL_SCHEME_HTTPS
|| url.scheme() == HIFI_URL_SCHEME_FILE)) { || url.scheme() == HIFI_URL_SCHEME_FILE)) {
qDebug() << "Writing URL to local socket"; qDebug() << "Writing URL to local socket";

View file

@ -139,9 +139,9 @@ void WindowScriptingInterface::disconnectedFromDomain() {
void WindowScriptingInterface::openUrl(const QUrl& url) { void WindowScriptingInterface::openUrl(const QUrl& url) {
if (!url.isEmpty()) { if (!url.isEmpty()) {
auto scheme = url.scheme(); auto scheme = url.scheme();
if (scheme == URL_SCHEME_HIFI) { if (scheme == URL_SCHEME_VIRCADIA) {
DependencyManager::get<AddressManager>()->handleLookupString(url.toString()); DependencyManager::get<AddressManager>()->handleLookupString(url.toString());
} else if (scheme == URL_SCHEME_HIFIAPP) { } else if (scheme == URL_SCHEME_VIRCADIAAPP) {
DependencyManager::get<QmlCommerce>()->openSystemApp(url.path()); DependencyManager::get<QmlCommerce>()->openSystemApp(url.path());
} else { } else {
#if defined(Q_OS_ANDROID) #if defined(Q_OS_ANDROID)

View file

@ -39,7 +39,7 @@ const QString SETTINGS_CURRENT_ADDRESS_KEY = "address";
const QString DEFAULT_VIRCADIA_ADDRESS = (!BuildInfo::PRELOADED_STARTUP_LOCATION.isEmpty()) const QString DEFAULT_VIRCADIA_ADDRESS = (!BuildInfo::PRELOADED_STARTUP_LOCATION.isEmpty())
? BuildInfo::PRELOADED_STARTUP_LOCATION ? BuildInfo::PRELOADED_STARTUP_LOCATION
: NetworkingConstants::DEFAULT_VIRCADIA_ADDRESS; : NetworkingConstants::DEFAULT_VIRCADIA_ADDRESS;
const QString DEFAULT_HOME_ADDRESS = (!BuildInfo::PRELOADED_STARTUP_LOCATION.isEmpty()) const QString DEFAULT_HOME_ADDRESS = (!BuildInfo::PRELOADED_STARTUP_LOCATION.isEmpty())
? BuildInfo::PRELOADED_STARTUP_LOCATION ? BuildInfo::PRELOADED_STARTUP_LOCATION
: NetworkingConstants::DEFAULT_VIRCADIA_ADDRESS; : NetworkingConstants::DEFAULT_VIRCADIA_ADDRESS;
@ -56,7 +56,7 @@ QString AddressManager::getProtocol() const {
QUrl AddressManager::currentAddress(bool domainOnly) const { QUrl AddressManager::currentAddress(bool domainOnly) const {
QUrl hifiURL = _domainURL; QUrl hifiURL = _domainURL;
if (!domainOnly && hifiURL.scheme() == URL_SCHEME_HIFI) { if (!domainOnly && hifiURL.scheme() == URL_SCHEME_VIRCADIA) {
hifiURL.setPath(currentPath()); hifiURL.setPath(currentPath());
} }
@ -65,7 +65,7 @@ QUrl AddressManager::currentAddress(bool domainOnly) const {
QUrl AddressManager::currentFacingAddress() const { QUrl AddressManager::currentFacingAddress() const {
auto hifiURL = currentAddress(); auto hifiURL = currentAddress();
if (hifiURL.scheme() == URL_SCHEME_HIFI) { if (hifiURL.scheme() == URL_SCHEME_VIRCADIA) {
hifiURL.setPath(currentFacingPath()); hifiURL.setPath(currentFacingPath());
} }
@ -77,7 +77,7 @@ QUrl AddressManager::currentShareableAddress(bool domainOnly) const {
// if we have a shareable place name use that instead of whatever the current host is // if we have a shareable place name use that instead of whatever the current host is
QUrl hifiURL; QUrl hifiURL;
hifiURL.setScheme(URL_SCHEME_HIFI); hifiURL.setScheme(URL_SCHEME_VIRCADIA);
hifiURL.setHost(_shareablePlaceName); hifiURL.setHost(_shareablePlaceName);
if (!domainOnly) { if (!domainOnly) {
@ -94,7 +94,7 @@ QUrl AddressManager::currentPublicAddress(bool domainOnly) const {
// return an address that can be used by others to visit this client's current location. If // return an address that can be used by others to visit this client's current location. If
// in a serverless domain (which can't be visited) return an empty URL. // in a serverless domain (which can't be visited) return an empty URL.
QUrl shareableAddress = currentShareableAddress(domainOnly); QUrl shareableAddress = currentShareableAddress(domainOnly);
if (shareableAddress.scheme() != URL_SCHEME_HIFI) { if (shareableAddress.scheme() != URL_SCHEME_VIRCADIA) {
return QUrl(); // file: urls aren't public return QUrl(); // file: urls aren't public
} }
return shareableAddress; return shareableAddress;
@ -103,7 +103,7 @@ QUrl AddressManager::currentPublicAddress(bool domainOnly) const {
QUrl AddressManager::currentFacingShareableAddress() const { QUrl AddressManager::currentFacingShareableAddress() const {
auto hifiURL = currentShareableAddress(); auto hifiURL = currentShareableAddress();
if (hifiURL.scheme() == URL_SCHEME_HIFI) { if (hifiURL.scheme() == URL_SCHEME_VIRCADIA) {
hifiURL.setPath(currentFacingPath()); hifiURL.setPath(currentFacingPath());
} }
@ -114,7 +114,7 @@ QUrl AddressManager::currentFacingPublicAddress() const {
// return an address that can be used by others to visit this client's current location. If // return an address that can be used by others to visit this client's current location. If
// in a serverless domain (which can't be visited) return an empty URL. // in a serverless domain (which can't be visited) return an empty URL.
QUrl shareableAddress = currentFacingShareableAddress(); QUrl shareableAddress = currentFacingShareableAddress();
if (shareableAddress.scheme() != URL_SCHEME_HIFI) { if (shareableAddress.scheme() != URL_SCHEME_VIRCADIA) {
return QUrl(); // file: urls aren't public return QUrl(); // file: urls aren't public
} }
return shareableAddress; return shareableAddress;
@ -165,7 +165,7 @@ void AddressManager::storeCurrentAddress() {
if (url.scheme() == HIFI_URL_SCHEME_FILE || if (url.scheme() == HIFI_URL_SCHEME_FILE ||
url.scheme() == HIFI_URL_SCHEME_HTTP || url.scheme() == HIFI_URL_SCHEME_HTTPS || url.scheme() == HIFI_URL_SCHEME_HTTP || url.scheme() == HIFI_URL_SCHEME_HTTPS ||
(url.scheme() == URL_SCHEME_HIFI && !url.host().isEmpty())) { (url.scheme() == URL_SCHEME_VIRCADIA && !url.host().isEmpty())) {
// TODO -- once Octree::readFromURL no-longer takes over the main event-loop, serverless-domain urls can // TODO -- once Octree::readFromURL no-longer takes over the main event-loop, serverless-domain urls can
// be loaded over http(s) // be loaded over http(s)
// url.scheme() == HIFI_URL_SCHEME_HTTP || // url.scheme() == HIFI_URL_SCHEME_HTTP ||
@ -242,7 +242,7 @@ const JSONCallbackParameters& AddressManager::apiCallbackParameters() {
return callbackParams; return callbackParams;
} }
bool AddressManager::handleUrl(const QUrl& lookupUrlIn, LookupTrigger trigger) { bool AddressManager::handleUrl(const QUrl& lookupUrlIn, LookupTrigger trigger, const QString& lookupUrlInString) {
static QString URL_TYPE_USER = "user"; static QString URL_TYPE_USER = "user";
static QString URL_TYPE_DOMAIN_ID = "domain_id"; static QString URL_TYPE_DOMAIN_ID = "domain_id";
static QString URL_TYPE_PLACE = "place"; static QString URL_TYPE_PLACE = "place";
@ -258,24 +258,32 @@ bool AddressManager::handleUrl(const QUrl& lookupUrlIn, LookupTrigger trigger) {
if (lookupUrl.scheme().isEmpty() && !lookupUrl.path().startsWith("/")) { if (lookupUrl.scheme().isEmpty() && !lookupUrl.path().startsWith("/")) {
// 'urls' without schemes are taken as domain names, as opposed to // 'urls' without schemes are taken as domain names, as opposed to
// simply a path portion of a url, so we need to set the scheme // simply a path portion of a url, so we need to set the scheme
lookupUrl.setScheme(URL_SCHEME_HIFI); lookupUrl.setScheme(URL_SCHEME_VIRCADIA);
} }
static const QRegExp PORT_REGEX = QRegExp("\\d{1,5}(\\/.*)?"); static const QRegExp PORT_REGEX = QRegExp("\\d{1,5}(\\/.*)?");
if(!lookupUrl.scheme().isEmpty() && lookupUrl.host().isEmpty() && PORT_REGEX.exactMatch(lookupUrl.path())) { if(!lookupUrl.scheme().isEmpty() && lookupUrl.host().isEmpty() && PORT_REGEX.exactMatch(lookupUrl.path())) {
// this is in the form somewhere:<port>, convert it to hifi://somewhere:<port> // this is in the form somewhere:<port>, convert it to hifi://somewhere:<port>
lookupUrl = QUrl(URL_SCHEME_HIFI + "://" + lookupUrl.toString()); lookupUrl = QUrl(URL_SCHEME_VIRCADIA + "://" + lookupUrl.toString());
} }
// it should be noted that url's in the form // it should be noted that url's in the form
// somewhere:<port> are not valid, as that // somewhere:<port> are not valid, as that
// would indicate that the scheme is 'somewhere' // would indicate that the scheme is 'somewhere'
// use hifi://somewhere:<port> instead // use hifi://somewhere:<port> instead
if (lookupUrl.scheme() == URL_SCHEME_HIFI) { if (lookupUrl.scheme() == URL_SCHEME_VIRCADIA || lookupUrlInString.startsWith(URL_SCHEME_VIRCADIA + "://")) {
QString lookupUrlString;
if (lookupUrlInString.startsWith(URL_SCHEME_VIRCADIA + "://")) {
lookupUrlString = lookupUrlInString;
} else {
lookupUrlString = lookupUrl.toString(QUrl::FullyEncoded);
}
if (lookupUrl.host().isEmpty()) { if (lookupUrl.host().isEmpty()) {
// this was in the form hifi:/somewhere or hifi:somewhere. Fix it by making it hifi://somewhere // this was in the form hifi:/somewhere or hifi:somewhere. Fix it by making it hifi://somewhere
static const QRegExp HIFI_SCHEME_REGEX = QRegExp(URL_SCHEME_HIFI + ":\\/{0,2}", Qt::CaseInsensitive); static const QRegExp HIFI_SCHEME_REGEX = QRegExp(URL_SCHEME_VIRCADIA + ":\\/{0,2}", Qt::CaseInsensitive);
lookupUrl = QUrl(lookupUrl.toString().replace(HIFI_SCHEME_REGEX, URL_SCHEME_HIFI + "://")); lookupUrl = QUrl(lookupUrl.toString().replace(HIFI_SCHEME_REGEX, URL_SCHEME_VIRCADIA + "://"));
} }
DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::LookupAddress); DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::LookupAddress);
@ -340,6 +348,8 @@ bool AddressManager::handleUrl(const QUrl& lookupUrlIn, LookupTrigger trigger) {
// try to look up the domain ID on the metaverse API // try to look up the domain ID on the metaverse API
attemptDomainIDLookup(lookupUrl.host(), lookupUrl.path(), trigger); attemptDomainIDLookup(lookupUrl.host(), lookupUrl.path(), trigger);
} else { } else {
// wasn't an address - lookup the place name
// we may have a path that defines a relative viewpoint - pass that through the lookup so we can go to it after
UserActivityLogger::getInstance().wentTo(trigger, URL_TYPE_PLACE, lookupUrl.toString()); UserActivityLogger::getInstance().wentTo(trigger, URL_TYPE_PLACE, lookupUrl.toString());
// save the last visited domain URL. // save the last visited domain URL.
@ -348,10 +358,26 @@ bool AddressManager::handleUrl(const QUrl& lookupUrlIn, LookupTrigger trigger) {
// store this place name as the previous lookup in case we fail to connect and want to refresh API info // store this place name as the previous lookup in case we fail to connect and want to refresh API info
_previousAPILookup = lookupUrl; _previousAPILookup = lookupUrl;
// wasn't an address - lookup the place name // Let's convert this to a QString for processing in case there are spaces in it.
// we may have a path that defines a relative viewpoint - pass that through the lookup so we can go to it after if (lookupUrlString.contains(URL_SCHEME_VIRCADIA + "://", Qt::CaseInsensitive)) {
if (!lookupUrl.host().isNull() && !lookupUrl.host().isEmpty()) { lookupUrlString = lookupUrlString.replace((URL_SCHEME_VIRCADIA + "://"), "");
attemptPlaceNameLookup(lookupUrl.host(), lookupUrl.path(), trigger); } else if (lookupUrlString.contains(URL_SCHEME_VIRCADIA + ":/", Qt::CaseInsensitive)) {
lookupUrlString = lookupUrlString.replace((URL_SCHEME_VIRCADIA + ":/"), "");
} else if (lookupUrlString.contains(URL_SCHEME_VIRCADIA + ":", Qt::CaseInsensitive)) {
lookupUrlString = lookupUrlString.replace((URL_SCHEME_VIRCADIA + ":"), "");
}
// Get the path and then strip it out.
QString lookupUrlStringPath;
int index = lookupUrlString.indexOf('/');
if (index != -1) {
lookupUrlStringPath = lookupUrlString.mid(index);
lookupUrlString.replace(lookupUrlStringPath, "");
}
if (!lookupUrlString.isEmpty()) {
attemptPlaceNameLookup(lookupUrlString, lookupUrlStringPath, trigger);
} }
} }
} }
@ -371,7 +397,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrlIn, LookupTrigger trigger) {
return true; return true;
} else if (lookupUrl.scheme() == HIFI_URL_SCHEME_FILE || lookupUrl.scheme() == HIFI_URL_SCHEME_HTTPS } else if (lookupUrl.scheme() == HIFI_URL_SCHEME_FILE || lookupUrl.scheme() == HIFI_URL_SCHEME_HTTPS
|| lookupUrl.scheme() == HIFI_URL_SCHEME_HTTP) { || lookupUrl.scheme() == HIFI_URL_SCHEME_HTTP) {
// Save the last visited domain URL. // Save the last visited domain URL.
_lastVisitedURL = lookupUrl; _lastVisitedURL = lookupUrl;
@ -412,13 +438,13 @@ bool isPossiblePlaceName(QString possiblePlaceName) {
} }
void AddressManager::handleLookupString(const QString& lookupString, bool fromSuggestions) { void AddressManager::handleLookupString(const QString& lookupString, bool fromSuggestions) {
QString trimmedString = lookupString.trimmed();
QString sanitizedString = lookupString.trimmed(); if (!trimmedString.isEmpty()) {
if (!sanitizedString.isEmpty()) {
resetConfirmConnectWithoutAvatarEntities(); resetConfirmConnectWithoutAvatarEntities();
// make this a valid hifi URL and handle it off to handleUrl // make this a valid hifi URL and handle it off to handleUrl
handleUrl(sanitizedString, fromSuggestions ? Suggestions : UserInput); handleUrl(trimmedString, fromSuggestions ? Suggestions : UserInput, trimmedString);
} }
} }
@ -494,7 +520,7 @@ void AddressManager::goToAddressFromObject(const QVariantMap& dataObject, const
qCDebug(networking) << "Possible domain change required to connect to" << domainHostname qCDebug(networking) << "Possible domain change required to connect to" << domainHostname
<< "on" << domainPort; << "on" << domainPort;
QUrl domainURL; QUrl domainURL;
domainURL.setScheme(URL_SCHEME_HIFI); domainURL.setScheme(URL_SCHEME_VIRCADIA);
domainURL.setHost(domainHostname); domainURL.setHost(domainHostname);
if (domainPort > 0) { if (domainPort > 0) {
domainURL.setPort(domainPort); domainURL.setPort(domainPort);
@ -606,8 +632,6 @@ void AddressManager::handleAPIError(QNetworkReply* errorReply) {
void AddressManager::attemptPlaceNameLookup(const QString& lookupString, const QString& overridePath, LookupTrigger trigger) { void AddressManager::attemptPlaceNameLookup(const QString& lookupString, const QString& overridePath, LookupTrigger trigger) {
// assume this is a place name and see if we can get any info on it // assume this is a place name and see if we can get any info on it
QString placeName = QUrl::toPercentEncoding(lookupString);
QVariantMap requestParams; QVariantMap requestParams;
// if the user asked for a specific path with this lookup then keep it with the request so we can use it later // if the user asked for a specific path with this lookup then keep it with the request so we can use it later
@ -618,7 +642,7 @@ void AddressManager::attemptPlaceNameLookup(const QString& lookupString, const Q
// remember how this lookup was triggered for history storage handling later // remember how this lookup was triggered for history storage handling later
requestParams.insert(LOOKUP_TRIGGER_KEY, static_cast<int>(trigger)); requestParams.insert(LOOKUP_TRIGGER_KEY, static_cast<int>(trigger));
DependencyManager::get<AccountManager>()->sendRequest(GET_PLACE.arg(placeName), DependencyManager::get<AccountManager>()->sendRequest(GET_PLACE.arg(lookupString),
AccountManagerAuth::None, AccountManagerAuth::None,
QNetworkAccessManager::GetOperation, QNetworkAccessManager::GetOperation,
apiCallbackParameters(), apiCallbackParameters(),
@ -667,7 +691,7 @@ bool AddressManager::handleNetworkAddress(const QString& lookupString, LookupTri
emit lookupResultsFinished(); emit lookupResultsFinished();
QUrl domainURL; QUrl domainURL;
domainURL.setScheme(URL_SCHEME_HIFI); domainURL.setScheme(URL_SCHEME_VIRCADIA);
domainURL.setHost(domainIPString); domainURL.setHost(domainIPString);
if (domainPort > 0) { if (domainPort > 0) {
domainURL.setPort(domainPort); domainURL.setPort(domainPort);
@ -690,7 +714,7 @@ bool AddressManager::handleNetworkAddress(const QString& lookupString, LookupTri
emit lookupResultsFinished(); emit lookupResultsFinished();
QUrl domainURL; QUrl domainURL;
domainURL.setScheme(URL_SCHEME_HIFI); domainURL.setScheme(URL_SCHEME_VIRCADIA);
domainURL.setHost(domainHostname); domainURL.setHost(domainHostname);
if (domainPort > 0) { if (domainPort > 0) {
domainURL.setPort(domainPort); domainURL.setPort(domainPort);
@ -823,7 +847,7 @@ bool AddressManager::setHost(const QString& host, LookupTrigger trigger, quint16
addCurrentAddressToHistory(trigger); addCurrentAddressToHistory(trigger);
_domainURL = QUrl(); _domainURL = QUrl();
_domainURL.setScheme(URL_SCHEME_HIFI); _domainURL.setScheme(URL_SCHEME_VIRCADIA);
_domainURL.setHost(host); _domainURL.setHost(host);
if (port > 0) { if (port > 0) {
_domainURL.setPort(port); _domainURL.setPort(port);
@ -860,7 +884,7 @@ bool AddressManager::setDomainInfo(const QUrl& domainURL, LookupTrigger trigger)
// clear any current place information // clear any current place information
_rootPlaceID = QUuid(); _rootPlaceID = QUuid();
if (_domainURL.scheme() == URL_SCHEME_HIFI) { if (_domainURL.scheme() == URL_SCHEME_VIRCADIA) {
qCDebug(networking) << "Possible domain change required to connect to domain at" << hostname << "on" << port; qCDebug(networking) << "Possible domain change required to connect to domain at" << hostname << "on" << port;
} else { } else {
qCDebug(networking) << "Possible domain change required to serverless domain: " << domainURL.toString(); qCDebug(networking) << "Possible domain change required to serverless domain: " << domainURL.toString();

View file

@ -4,6 +4,7 @@
// //
// Created by Stephen Birarda on 2014-09-10. // Created by Stephen Birarda on 2014-09-10.
// Copyright 2014 High Fidelity, Inc. // Copyright 2014 High Fidelity, Inc.
// Copyright 2021 Vircadia contributors.
// //
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
@ -35,7 +36,7 @@ const QString GET_PLACE = "/api/v1/places/%1";
* The <code>location</code> API provides facilities related to your current location in the metaverse. * The <code>location</code> API provides facilities related to your current location in the metaverse.
* *
* <h3>Getter/Setter</h3> * <h3>Getter/Setter</h3>
* <p>You can get and set your current metaverse address by directly reading a string value from and writing a string value to * <p>You can get and set your current metaverse address by directly reading a string value from and writing a string value to
* the <code>location</code> object. This is an alternative to using the <code>location.href</code> property or other object * the <code>location</code> object. This is an alternative to using the <code>location.href</code> property or other object
* functions.</p> * functions.</p>
* *
@ -53,12 +54,12 @@ const QString GET_PLACE = "/api/v1/places/%1";
* <code>localhost</code>, or an IP address). Is blank if you're in a serverless domain. * <code>localhost</code>, or an IP address). Is blank if you're in a serverless domain.
* <em>Read-only.</em> * <em>Read-only.</em>
* @property {string} href - Your current metaverse address (e.g., <code>"hifi://domainname/15,-10,26/0,0,0,1"</code>) * @property {string} href - Your current metaverse address (e.g., <code>"hifi://domainname/15,-10,26/0,0,0,1"</code>)
* regardless of whether or not you're connected to the domain. Starts with <code>"file:///"</code> if you're in a * regardless of whether or not you're connected to the domain. Starts with <code>"file:///"</code> if you're in a
* serverless domain. * serverless domain.
* <em>Read-only.</em> * <em>Read-only.</em>
* @property {boolean} isConnected - <code>true</code> if you're connected to the domain in your current <code>href</code> * @property {boolean} isConnected - <code>true</code> if you're connected to the domain in your current <code>href</code>
* metaverse address, otherwise <code>false</code>. * metaverse address, otherwise <code>false</code>.
* @property {string} pathname - The location and orientation in your current <code>href</code> metaverse address * @property {string} pathname - The location and orientation in your current <code>href</code> metaverse address
* (e.g., <code>"/15,-10,26/0,0,0,1"</code>). * (e.g., <code>"/15,-10,26/0,0,0,1"</code>).
* <em>Read-only.</em> * <em>Read-only.</em>
* @property {string} placename - The place name in your current <code>href</code> metaverse address * @property {string} placename - The place name in your current <code>href</code> metaverse address
@ -77,7 +78,7 @@ const QString GET_PLACE = "/api/v1/places/%1";
* @hifi-client-entity * @hifi-client-entity
* @hifi-avatar * @hifi-avatar
* *
* @deprecated This API is deprecated and will be removed. Use the {@link location} or {@link Window|Window.location} APIs * @deprecated This API is deprecated and will be removed. Use the {@link location} or {@link Window|Window.location} APIs
* instead. * instead.
* *
* @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NULL} if you're not * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NULL} if you're not
@ -248,9 +249,9 @@ public slots:
/*@jsdoc /*@jsdoc
* Takes you to a specified metaverse address. * Takes you to a specified metaverse address.
* @function location.handleLookupString * @function location.handleLookupString
* @param {string} address - The address to go to: a <code>"hifi://"</code> address, an IP address (e.g., * @param {string} address - The address to go to: a <code>"hifi://"</code> address, an IP address (e.g.,
* <code>"127.0.0.1"</code> or <code>"localhost"</code>), a <code>file:///</code> address, a domain name, a named path * <code>"127.0.0.1"</code> or <code>"localhost"</code>), a <code>file:///</code> address, a domain name, a named path
* on a domain (starts with <code>"/"</code>), a position or position and orientation, or a user (starts with * on a domain (starts with <code>"/"</code>), a position or position and orientation, or a user (starts with
* <code>"@"</code>). * <code>"@"</code>).
* @param {boolean} [fromSuggestions=false] - Set to <code>true</code> if the address is obtained from the "Explore" app. * @param {boolean} [fromSuggestions=false] - Set to <code>true</code> if the address is obtained from the "Explore" app.
* Helps ensure that the user's location history is correctly maintained. * Helps ensure that the user's location history is correctly maintained.
@ -258,7 +259,7 @@ public slots:
void handleLookupString(const QString& lookupString, bool fromSuggestions = false); void handleLookupString(const QString& lookupString, bool fromSuggestions = false);
/*@jsdoc /*@jsdoc
* Takes you to a position and orientation resulting from a lookup for a named path in the domain (set in the domain * Takes you to a position and orientation resulting from a lookup for a named path in the domain (set in the domain
* server's settings). * server's settings).
* @function location.goToViewpointForPath * @function location.goToViewpointForPath
* @param {string} path - The position and orientation corresponding to the named path. * @param {string} path - The position and orientation corresponding to the named path.
@ -292,7 +293,7 @@ public slots:
* location history is correctly maintained. * location history is correctly maintained.
*/ */
void goToLocalSandbox(QString path = "", LookupTrigger trigger = LookupTrigger::StartupFromSettings) { void goToLocalSandbox(QString path = "", LookupTrigger trigger = LookupTrigger::StartupFromSettings) {
handleUrl(SANDBOX_HIFI_ADDRESS + path, trigger); handleUrl(SANDBOX_HIFI_ADDRESS + path, trigger);
} }
/*@jsdoc /*@jsdoc
@ -307,7 +308,7 @@ public slots:
* Takes you to the specified user's location. * Takes you to the specified user's location.
* @function location.goToUser * @function location.goToUser
* @param {string} username - The user's username. * @param {string} username - The user's username.
* @param {boolean} [matchOrientation=true] - If <code>true</code> then go to a location just in front of the user and turn * @param {boolean} [matchOrientation=true] - If <code>true</code> then go to a location just in front of the user and turn
* to face them, otherwise go to the user's exact location and orientation. * to face them, otherwise go to the user's exact location and orientation.
*/ */
void goToUser(const QString& username, bool shouldMatchOrientation = true); void goToUser(const QString& username, bool shouldMatchOrientation = true);
@ -348,7 +349,7 @@ public slots:
void copyAddress(); void copyAddress();
/*@jsdoc /*@jsdoc
* Copies your current metaverse location and orientation (i.e., <code>location.pathname</code> property value) to the OS * Copies your current metaverse location and orientation (i.e., <code>location.pathname</code> property value) to the OS
* clipboard. * clipboard.
* @function location.copyPath * @function location.copyPath
*/ */
@ -374,7 +375,7 @@ signals:
void lookupResultsFinished(); void lookupResultsFinished();
/*@jsdoc /*@jsdoc
* Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user is * Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user is
* offline. * offline.
* @function location.lookupResultIsOffline * @function location.lookupResultIsOffline
* @returns {Signal} * @returns {Signal}
@ -415,9 +416,9 @@ signals:
* @function location.locationChangeRequired * @function location.locationChangeRequired
* @param {Vec3} position - The position to go to. * @param {Vec3} position - The position to go to.
* @param {boolean} hasOrientationChange - If <code>true</code> then a new <code>orientation</code> has been requested. * @param {boolean} hasOrientationChange - If <code>true</code> then a new <code>orientation</code> has been requested.
* @param {Quat} orientation - The orientation to change to. Is {@link Quat(0)|Quat.IDENTITY} if * @param {Quat} orientation - The orientation to change to. Is {@link Quat(0)|Quat.IDENTITY} if
* <code>hasOrientationChange</code> is <code>false</code>. * <code>hasOrientationChange</code> is <code>false</code>.
* @param {boolean} shouldFaceLocation - If <code>true</code> then the request is to go to a position near that specified * @param {boolean} shouldFaceLocation - If <code>true</code> then the request is to go to a position near that specified
* and orient your avatar to face it. For example when you visit someone from the "People" dialog. * and orient your avatar to face it. For example when you visit someone from the "People" dialog.
* @returns {Signal} * @returns {Signal}
* @example <caption>Report location change requests.</caption> * @example <caption>Report location change requests.</caption>
@ -468,7 +469,7 @@ signals:
* Triggered when there's a change in whether or not there's a previous location that can be navigated to using * Triggered when there's a change in whether or not there's a previous location that can be navigated to using
* {@link location.goBack|goBack}. (Reflects changes in the state of the "Goto" dialog's back arrow.) * {@link location.goBack|goBack}. (Reflects changes in the state of the "Goto" dialog's back arrow.)
* @function location.goBackPossible * @function location.goBackPossible
* @param {boolean} isPossible - <code>true</code> if there's a previous location to navigate to, otherwise * @param {boolean} isPossible - <code>true</code> if there's a previous location to navigate to, otherwise
* <code>false</code>. * <code>false</code>.
* @returns {Signal} * @returns {Signal}
* @example <caption>Report when ability to navigate back changes.</caption> * @example <caption>Report when ability to navigate back changes.</caption>
@ -511,7 +512,7 @@ private:
const JSONCallbackParameters& apiCallbackParameters(); const JSONCallbackParameters& apiCallbackParameters();
bool handleUrl(const QUrl& lookupUrl, LookupTrigger trigger = UserInput); bool handleUrl(const QUrl& lookupUrl, LookupTrigger trigger = UserInput, const QString& lookupUrlInString = "");
bool handleNetworkAddress(const QString& lookupString, LookupTrigger trigger, bool& hostChanged); bool handleNetworkAddress(const QString& lookupString, LookupTrigger trigger, bool& hostChanged);
void handlePath(const QString& path, LookupTrigger trigger, bool wasPathOnly = false); void handlePath(const QString& path, LookupTrigger trigger, bool wasPathOnly = false);

View file

@ -184,7 +184,7 @@ void DomainHandler::setSockAddr(const SockAddr& sockAddr, const QString& hostnam
// some callers may pass a hostname, this is not to be used for lookup but for DTLS certificate verification // some callers may pass a hostname, this is not to be used for lookup but for DTLS certificate verification
_domainURL = QUrl(); _domainURL = QUrl();
_domainURL.setScheme(URL_SCHEME_HIFI); _domainURL.setScheme(URL_SCHEME_VIRCADIA);
_domainURL.setHost(hostname); _domainURL.setHost(hostname);
_domainURL.setPort(_sockAddr.getPort()); _domainURL.setPort(_sockAddr.getPort());
} }
@ -199,7 +199,7 @@ void DomainHandler::setUUID(const QUuid& uuid) {
void DomainHandler::setURLAndID(QUrl domainURL, QUuid domainID) { void DomainHandler::setURLAndID(QUrl domainURL, QUuid domainID) {
_pendingDomainID = domainID; _pendingDomainID = domainID;
if (domainURL.scheme() != URL_SCHEME_HIFI) { if (domainURL.scheme() != URL_SCHEME_VIRCADIA) {
_sockAddr.clear(); _sockAddr.clear();
// if this is a file URL we need to see if it has a ~ for us to expand // if this is a file URL we need to see if it has a ~ for us to expand
@ -215,7 +215,7 @@ void DomainHandler::setURLAndID(QUrl domainURL, QUuid domainID) {
// if it's in the error state, reset and try again. // if it's in the error state, reset and try again.
if (_domainURL != domainURL if (_domainURL != domainURL
|| (_sockAddr.getPort() != domainPort && domainURL.scheme() == URL_SCHEME_HIFI) || (_sockAddr.getPort() != domainPort && domainURL.scheme() == URL_SCHEME_VIRCADIA)
|| isServerless() // For reloading content in serverless domain. || isServerless() // For reloading content in serverless domain.
|| _isInErrorState) { || _isInErrorState) {
// re-set the domain info so that auth information is reloaded // re-set the domain info so that auth information is reloaded
@ -230,7 +230,7 @@ void DomainHandler::setURLAndID(QUrl domainURL, QUuid domainID) {
qCDebug(networking) << "Updated domain hostname to" << domainURL.host(); qCDebug(networking) << "Updated domain hostname to" << domainURL.host();
if (!domainURL.host().isEmpty()) { if (!domainURL.host().isEmpty()) {
if (domainURL.scheme() == URL_SCHEME_HIFI) { if (domainURL.scheme() == URL_SCHEME_VIRCADIA) {
// re-set the sock addr to null and fire off a lookup of the IP address for this domain-server's hostname // re-set the sock addr to null and fire off a lookup of the IP address for this domain-server's hostname
qCDebug(networking, "Looking up DS hostname %s.", domainURL.host().toLocal8Bit().constData()); qCDebug(networking, "Looking up DS hostname %s.", domainURL.host().toLocal8Bit().constData());
QHostInfo::lookupHost(domainURL.host(), this, SLOT(completedHostnameLookup(const QHostInfo&))); QHostInfo::lookupHost(domainURL.host(), this, SLOT(completedHostnameLookup(const QHostInfo&)));
@ -303,7 +303,7 @@ void DomainHandler::setIceServerHostnameAndID(const QString& iceServerHostname,
void DomainHandler::activateICELocalSocket() { void DomainHandler::activateICELocalSocket() {
DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SetDomainSocket); DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SetDomainSocket);
_sockAddr = _icePeer.getLocalSocket(); _sockAddr = _icePeer.getLocalSocket();
_domainURL.setScheme(URL_SCHEME_HIFI); _domainURL.setScheme(URL_SCHEME_VIRCADIA);
_domainURL.setHost(_sockAddr.getAddress().toString()); _domainURL.setHost(_sockAddr.getAddress().toString());
emit domainURLChanged(_domainURL); emit domainURLChanged(_domainURL);
emit completedSocketDiscovery(); emit completedSocketDiscovery();
@ -312,7 +312,7 @@ void DomainHandler::activateICELocalSocket() {
void DomainHandler::activateICEPublicSocket() { void DomainHandler::activateICEPublicSocket() {
DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SetDomainSocket); DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SetDomainSocket);
_sockAddr = _icePeer.getPublicSocket(); _sockAddr = _icePeer.getPublicSocket();
_domainURL.setScheme(URL_SCHEME_HIFI); _domainURL.setScheme(URL_SCHEME_VIRCADIA);
_domainURL.setHost(_sockAddr.getAddress().toString()); _domainURL.setHost(_sockAddr.getAddress().toString());
emit domainURLChanged(_domainURL); emit domainURLChanged(_domainURL);
emit completedSocketDiscovery(); emit completedSocketDiscovery();
@ -369,7 +369,7 @@ void DomainHandler::setIsConnected(bool isConnected) {
// FIXME: Reinstate the requestDomainSettings() call here in version 2021.2.0 instead of having it in // FIXME: Reinstate the requestDomainSettings() call here in version 2021.2.0 instead of having it in
// NodeList::processDomainServerList(). // NodeList::processDomainServerList().
/* /*
if (_domainURL.scheme() == URL_SCHEME_HIFI && !_domainURL.host().isEmpty()) { if (_domainURL.scheme() == URL_SCHEME_VIRCADIA && !_domainURL.host().isEmpty()) {
// we've connected to new domain - time to ask it for global settings // we've connected to new domain - time to ask it for global settings
requestDomainSettings(); requestDomainSettings();
} }

View file

@ -137,7 +137,7 @@ public:
void setCanConnectWithoutAvatarEntities(bool canConnect); void setCanConnectWithoutAvatarEntities(bool canConnect);
bool canConnectWithoutAvatarEntities(); bool canConnectWithoutAvatarEntities();
bool isServerless() const { return _domainURL.scheme() != URL_SCHEME_HIFI; } bool isServerless() const { return _domainURL.scheme() != URL_SCHEME_VIRCADIA; }
bool getInterstitialModeEnabled() const; bool getInterstitialModeEnabled() const;
void setInterstitialModeEnabled(bool enableInterstitialMode); void setInterstitialModeEnabled(bool enableInterstitialMode);

View file

@ -25,7 +25,7 @@ namespace NetworkingConstants {
// You can avoid changing that and still effectively use a connected domain on staging // You can avoid changing that and still effectively use a connected domain on staging
// if you manually generate a personal access token for the domains scope // if you manually generate a personal access token for the domains scope
// at https://staging.highfidelity.com/user/tokens/new?for_domain_server=true // at https://staging.highfidelity.com/user/tokens/new?for_domain_server=true
const QString WEB_ENGINE_VERSION = "Chrome/83.0.4103.122"; const QString WEB_ENGINE_VERSION = "Chrome/83.0.4103.122";
// For now we only have one Metaverse server. // For now we only have one Metaverse server.
@ -35,21 +35,21 @@ namespace NetworkingConstants {
// Web Engine requests to this parent domain have an account authorization header added // Web Engine requests to this parent domain have an account authorization header added
const QString AUTH_HOSTNAME_BASE = "vircadia.com"; const QString AUTH_HOSTNAME_BASE = "vircadia.com";
const QStringList IS_AUTHABLE_HOSTNAME = { "vircadia.com", "vircadia.io" }; const QStringList IS_AUTHABLE_HOSTNAME = { "vircadia.com", "vircadia.io" };
// Use a custom User-Agent to avoid ModSecurity filtering, e.g. by hosting providers. // Use a custom User-Agent to avoid ModSecurity filtering, e.g. by hosting providers.
const QByteArray VIRCADIA_USER_AGENT = "Mozilla/5.0 (VircadiaInterface)"; const QByteArray VIRCADIA_USER_AGENT = "Mozilla/5.0 (VircadiaInterface)";
const QString WEB_ENGINE_USER_AGENT = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) " + WEB_ENGINE_VERSION + " Mobile Safari/537.36"; const QString WEB_ENGINE_USER_AGENT = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) " + WEB_ENGINE_VERSION + " Mobile Safari/537.36";
const QString MOBILE_USER_AGENT = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) " + WEB_ENGINE_VERSION + " Mobile Safari/537.36"; const QString MOBILE_USER_AGENT = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) " + WEB_ENGINE_VERSION + " Mobile Safari/537.36";
// WebEntity Defaults // WebEntity Defaults
const QString WEB_ENTITY_DEFAULT_SOURCE_URL = "https://vircadia.com/"; const QString WEB_ENTITY_DEFAULT_SOURCE_URL = "https://vircadia.com/";
const QString WEB_ENTITY_DEFAULT_USER_AGENT = WEB_ENGINE_USER_AGENT; const QString WEB_ENTITY_DEFAULT_USER_AGENT = WEB_ENGINE_USER_AGENT;
// Builds URLs // Builds URLs
const QUrl BUILDS_XML_URL("https://highfidelity.com/builds.xml"); const QUrl BUILDS_XML_URL("https://highfidelity.com/builds.xml");
const QUrl MASTER_BUILDS_XML_URL("https://highfidelity.com/dev-builds.xml"); const QUrl MASTER_BUILDS_XML_URL("https://highfidelity.com/dev-builds.xml");
const QString DEFAULT_AVATAR_COLLISION_SOUND_URL = "https://hifi-public.s3.amazonaws.com/sounds/Collisions-otherorganic/Body_Hits_Impact.wav"; const QString DEFAULT_AVATAR_COLLISION_SOUND_URL = "https://hifi-public.s3.amazonaws.com/sounds/Collisions-otherorganic/Body_Hits_Impact.wav";
// CDN URLs // CDN URLs
@ -71,21 +71,24 @@ namespace NetworkingConstants {
const unsigned short STUN_SERVER_DEFAULT_PORT = 19302; const unsigned short STUN_SERVER_DEFAULT_PORT = 19302;
#endif #endif
const QUrl TALK_DIRECTORY_URL{ "https://vircadia.com/#talk" };
const QUrl HELP_DOCS_URL{ "https://docs.vircadia.com" }; const QUrl HELP_DOCS_URL{ "https://docs.vircadia.com" };
const QUrl HELP_FORUM_URL{ "https://forum.vircadia.com" }; const QUrl HELP_FORUM_URL{ "https://forum.vircadia.com" };
const QUrl TALK_DIRECTORY_URL{ "https://vircadia.com/#talk" }; const QUrl HELP_DOCS_URL { "https://docs.vircadia.com" };
const QUrl HELP_FORUM_URL { "https://forum.vircadia.com" };
const QUrl HELP_SCRIPTING_REFERENCE_URL{ "https://apidocs.vircadia.dev/" }; const QUrl HELP_SCRIPTING_REFERENCE_URL{ "https://apidocs.vircadia.dev/" };
const QUrl HELP_RELEASE_NOTES_URL{ "https://docs.vircadia.com/release-notes.html" }; const QUrl HELP_RELEASE_NOTES_URL{ "https://docs.vircadia.com/release-notes.html" };
const QUrl HELP_BUG_REPORT_URL{ "https://github.com/vircadia/vircadia/issues" }; const QUrl HELP_BUG_REPORT_URL{ "https://github.com/vircadia/vircadia/issues" };
const QString DEFAULT_VIRCADIA_ADDRESS = "file:///~/serverless/tutorial.json"; const QString DEFAULT_VIRCADIA_ADDRESS = "file:///~/serverless/tutorial.json";
const QString DEFAULT_HOME_ADDRESS = "file:///~/serverless/tutorial.json"; const QString DEFAULT_HOME_ADDRESS = "file:///~/serverless/tutorial.json";
const QString REDIRECT_HIFI_ADDRESS = "file:///~/serverless/redirect.json"; const QString REDIRECT_HIFI_ADDRESS = "file:///~/serverless/redirect.json";
} }
const QString HIFI_URL_SCHEME_ABOUT = "about"; const QString HIFI_URL_SCHEME_ABOUT = "about";
const QString URL_SCHEME_HIFI = "hifi"; const QString URL_SCHEME_VIRCADIA = "hifi";
const QString URL_SCHEME_HIFIAPP = "hifiapp"; const QString URL_SCHEME_VIRCADIAAPP = "hifiapp";
const QString URL_SCHEME_DATA = "data"; const QString URL_SCHEME_DATA = "data";
const QString URL_SCHEME_QRC = "qrc"; const QString URL_SCHEME_QRC = "qrc";
const QString HIFI_URL_SCHEME_FILE = "file"; const QString HIFI_URL_SCHEME_FILE = "file";

View file

@ -824,7 +824,7 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
// FIXME: Remove this call to requestDomainSettings() and reinstate the one in DomainHandler::setIsConnected(), in version // FIXME: Remove this call to requestDomainSettings() and reinstate the one in DomainHandler::setIsConnected(), in version
// 2021.2.0. (New protocol version implies a domain server upgrade.) // 2021.2.0. (New protocol version implies a domain server upgrade.)
if (!_domainHandler.isConnected() if (!_domainHandler.isConnected()
&& _domainHandler.getScheme() == URL_SCHEME_HIFI && !_domainHandler.getHostname().isEmpty()) { && _domainHandler.getScheme() == URL_SCHEME_VIRCADIA && !_domainHandler.getHostname().isEmpty()) {
// We're about to connect but we need the domain settings (in particular, the node permissions) in order to adjust the // We're about to connect but we need the domain settings (in particular, the node permissions) in order to adjust the
// canRezAvatarEntities permission above before using the permissions in determining whether or not to connect without // canRezAvatarEntities permission above before using the permissions in determining whether or not to connect without
// avatar entities rezzing below. // avatar entities rezzing below.

View file

@ -2405,7 +2405,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co
QString currentDomain = DependencyManager::get<AddressManager>()->getDomainURL().host(); QString currentDomain = DependencyManager::get<AddressManager>()->getDomainURL().host();
QString domainSafeIP = nodeList->getDomainHandler().getHostname(); QString domainSafeIP = nodeList->getDomainHandler().getHostname();
QString domainSafeURL = URL_SCHEME_HIFI + "://" + currentDomain; QString domainSafeURL = URL_SCHEME_VIRCADIA + "://" + currentDomain;
for (const auto& str : safeURLPrefixes) { for (const auto& str : safeURLPrefixes) {
if (domainSafeURL.startsWith(str) || domainSafeIP.startsWith(str)) { if (domainSafeURL.startsWith(str) || domainSafeIP.startsWith(str)) {
qCDebug(scriptengine) << whitelistPrefix << "Whitelist Bypassed, entire domain is whitelisted. Current Domain Host: " qCDebug(scriptengine) << whitelistPrefix << "Whitelist Bypassed, entire domain is whitelisted. Current Domain Host: "