mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:41:02 +02:00
don't require an active domain connection for location update
This commit is contained in:
parent
ed1ddc2a8b
commit
258c5308db
1 changed files with 55 additions and 56 deletions
|
@ -37,13 +37,10 @@ const QString SESSION_ID_KEY = "session_id";
|
|||
void DiscoverabilityManager::updateLocation() {
|
||||
AccountManager& accountManager = AccountManager::getInstance();
|
||||
|
||||
if (_mode.get() != Discoverability::None) {
|
||||
if (_mode.get() != Discoverability::None && accountManager.isLoggedIn()) {
|
||||
auto addressManager = DependencyManager::get<AddressManager>();
|
||||
DomainHandler& domainHandler = DependencyManager::get<NodeList>()->getDomainHandler();
|
||||
|
||||
if (accountManager.isLoggedIn() && domainHandler.isConnected()
|
||||
&& (!addressManager->getRootPlaceID().isNull() || !domainHandler.getUUID().isNull())) {
|
||||
|
||||
// construct a QJsonObject given the user's current address information
|
||||
QJsonObject rootObject;
|
||||
|
||||
|
@ -56,6 +53,9 @@ void DiscoverabilityManager::updateLocation() {
|
|||
const QString PATH_KEY_IN_LOCATION = "path";
|
||||
locationObject.insert(PATH_KEY_IN_LOCATION, pathString);
|
||||
|
||||
const QString CONNECTED_KEY_IN_LOCATION = "connected";
|
||||
locationObject.insert(CONNECTED_KEY_IN_LOCATION, domainHandler.isConnected());
|
||||
|
||||
if (!addressManager->getRootPlaceID().isNull()) {
|
||||
const QString PLACE_ID_KEY_IN_LOCATION = "place_id";
|
||||
locationObject.insert(PLACE_ID_KEY_IN_LOCATION,
|
||||
|
@ -102,7 +102,6 @@ void DiscoverabilityManager::updateLocation() {
|
|||
QNetworkAccessManager::PutOperation,
|
||||
callbackParameters, QJsonDocument(rootObject).toJson());
|
||||
|
||||
}
|
||||
} else if (UserActivityLogger::getInstance().isEnabled()) {
|
||||
// we still send a heartbeat to the metaverse server for stats collection
|
||||
|
||||
|
|
Loading…
Reference in a new issue