mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 08:36:26 +02:00
Merge branch 'master' of https://github.com/worklist/hifi into 19508
This commit is contained in:
commit
b619eb7de0
3 changed files with 6 additions and 6 deletions
|
@ -3367,9 +3367,9 @@ void Application::connectedToDomain(const QString& hostname) {
|
||||||
if (accountManager.isLoggedIn()) {
|
if (accountManager.isLoggedIn()) {
|
||||||
// update our domain-server with the data-server we're logged in with
|
// update our domain-server with the data-server we're logged in with
|
||||||
|
|
||||||
QString domainPutJsonString = "{\"location\":{\"domain\":\"" + hostname + "\"}}";
|
QString domainPutJsonString = "{\"address\":{\"domain\":\"" + hostname + "\"}}";
|
||||||
|
|
||||||
accountManager.authenticatedRequest("/api/v1/users/location", QNetworkAccessManager::PutOperation,
|
accountManager.authenticatedRequest("/api/v1/users/address", QNetworkAccessManager::PutOperation,
|
||||||
JSONCallbackParameters(), domainPutJsonString.toUtf8());
|
JSONCallbackParameters(), domainPutJsonString.toUtf8());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -869,7 +869,7 @@ void Menu::goTo() {
|
||||||
callbackParams.jsonCallbackMethod = "goToLocationFromResponse";
|
callbackParams.jsonCallbackMethod = "goToLocationFromResponse";
|
||||||
|
|
||||||
// there's a username entered by the user, make a request to the data-server for the associated location
|
// there's a username entered by the user, make a request to the data-server for the associated location
|
||||||
AccountManager::getInstance().authenticatedRequest("/api/v1/users/" + gotoDialog.textValue() + "/location",
|
AccountManager::getInstance().authenticatedRequest("/api/v1/users/" + gotoDialog.textValue() + "/address",
|
||||||
QNetworkAccessManager::GetOperation,
|
QNetworkAccessManager::GetOperation,
|
||||||
callbackParams);
|
callbackParams);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1139,10 +1139,10 @@ void MyAvatar::updateLocationInDataServer() {
|
||||||
QString orientationString(createByteArray(safeEulerAngles(getOrientation())));
|
QString orientationString(createByteArray(safeEulerAngles(getOrientation())));
|
||||||
|
|
||||||
// construct the json to put the user's location
|
// construct the json to put the user's location
|
||||||
QString locationPutJson = QString() + "{\"location\":{\"position\":\""
|
QString locationPutJson = QString() + "{\"address\":{\"position\":\""
|
||||||
+ positionString + "\", \"orientation\":\"" + orientationString + "\"}}";
|
+ positionString + "\", \"orientation\":\"" + orientationString + "\"}}";
|
||||||
|
|
||||||
accountManager.authenticatedRequest("/api/v1/users/location", QNetworkAccessManager::PutOperation,
|
accountManager.authenticatedRequest("/api/v1/users/address", QNetworkAccessManager::PutOperation,
|
||||||
JSONCallbackParameters(), locationPutJson.toUtf8());
|
JSONCallbackParameters(), locationPutJson.toUtf8());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1154,7 +1154,7 @@ void MyAvatar::goToLocationFromResponse(const QJsonObject& jsonObject) {
|
||||||
// send a node kill request, indicating to other clients that they should play the "disappeared" effect
|
// send a node kill request, indicating to other clients that they should play the "disappeared" effect
|
||||||
sendKillAvatar();
|
sendKillAvatar();
|
||||||
|
|
||||||
QJsonObject locationObject = jsonObject["data"].toObject()["location"].toObject();
|
QJsonObject locationObject = jsonObject["data"].toObject()["address"].toObject();
|
||||||
QString positionString = locationObject["position"].toString();
|
QString positionString = locationObject["position"].toString();
|
||||||
QString orientationString = locationObject["orientation"].toString();
|
QString orientationString = locationObject["orientation"].toString();
|
||||||
QString domainHostnameString = locationObject["domain"].toString();
|
QString domainHostnameString = locationObject["domain"].toString();
|
||||||
|
|
Loading…
Reference in a new issue