mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
reset to temp domain after logout
This commit is contained in:
parent
1de1c632af
commit
13310923c4
2 changed files with 12 additions and 9 deletions
|
@ -457,6 +457,8 @@ function disonnectHighFidelityAccount() {
|
|||
}, function(){
|
||||
// we need to post to settings to clear the access-token
|
||||
$(Settings.ACCESS_TOKEN_SELECTOR).val('').change();
|
||||
// reset the domain id to get a new temporary name
|
||||
$(Settings.DOMAIN_ID_SELECTOR).val('').change();
|
||||
saveSettings();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -111,12 +111,6 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
|||
return;
|
||||
}
|
||||
|
||||
// check for the temporary name parameter
|
||||
const QString GET_TEMPORARY_NAME_SWITCH = "--get-temp-name";
|
||||
if (args.contains(GET_TEMPORARY_NAME_SWITCH)) {
|
||||
getTemporaryName();
|
||||
}
|
||||
|
||||
setupNodeListAndAssignments();
|
||||
setupAutomaticNetworking();
|
||||
if (!getID().isNull()) {
|
||||
|
@ -125,6 +119,12 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
|||
sendHeartbeatToMetaverse();
|
||||
}
|
||||
|
||||
// check for the temporary name parameter
|
||||
const QString GET_TEMPORARY_NAME_SWITCH = "--get-temp-name";
|
||||
if (args.contains(GET_TEMPORARY_NAME_SWITCH)) {
|
||||
getTemporaryName();
|
||||
}
|
||||
|
||||
_gatekeeper.preloadAllowedUserPublicKeys(); // so they can connect on first request
|
||||
|
||||
_metadata = new DomainMetadata(this);
|
||||
|
@ -251,12 +251,13 @@ void DomainServer::getTemporaryName(bool force) {
|
|||
// check if we already have a domain ID
|
||||
const QVariant* idValueVariant = valueForKeyPath(_settingsManager.getSettingsMap(), METAVERSE_DOMAIN_ID_KEY_PATH);
|
||||
|
||||
qInfo() << "Requesting temporary domain name";
|
||||
if (idValueVariant) {
|
||||
qWarning() << "Temporary domain name requested but a domain ID is already present in domain-server settings.";
|
||||
qDebug() << "A domain ID is already present in domain-server settings:" << idValueVariant->toString();
|
||||
if (force) {
|
||||
qWarning() << "Temporary domain name will be requested to replace it.";
|
||||
qDebug() << "Requesting temporary domain name to replace current ID:" << getID();
|
||||
} else {
|
||||
qWarning() << "Temporary domain name will not be requested.";
|
||||
qInfo() << "Abandoning request of temporary domain name.";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue