mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 09:33:29 +02:00
This patch updates Application::updateLocationInServer() in Application.cpp
The online status is updated when the position is send to the data web, a avatar gets an offline status if the data web did not get an update in the last 30 seconds. This function had an LastLocationObject in which only send in the location info to the data web in case the location changed. Removed the last location so the position of the avatar is send to the data web every 5 seconds, so that the online status remains online if the avatar is still online and does not switch to offline when the avatar does not move.
This commit is contained in:
parent
95cab15864
commit
e62834c197
1 changed files with 3 additions and 10 deletions
|
@ -3349,8 +3349,6 @@ void Application::updateLocationInServer() {
|
|||
|
||||
if (accountManager.isLoggedIn()) {
|
||||
|
||||
static QJsonObject lastLocationObject;
|
||||
|
||||
// construct a QJsonObject given the user's current address information
|
||||
QJsonObject updatedLocationObject;
|
||||
|
||||
|
@ -3361,14 +3359,9 @@ void Application::updateLocationInServer() {
|
|||
|
||||
updatedLocationObject.insert("address", addressObject);
|
||||
|
||||
if (updatedLocationObject != lastLocationObject) {
|
||||
|
||||
accountManager.authenticatedRequest("/api/v1/users/address", QNetworkAccessManager::PutOperation,
|
||||
JSONCallbackParameters(), QJsonDocument(updatedLocationObject).toJson());
|
||||
|
||||
lastLocationObject = updatedLocationObject;
|
||||
}
|
||||
}
|
||||
accountManager.authenticatedRequest("/api/v1/users/address", QNetworkAccessManager::PutOperation,
|
||||
JSONCallbackParameters(), QJsonDocument(updatedLocationObject).toJson());
|
||||
}
|
||||
}
|
||||
|
||||
void Application::domainChanged(const QString& domainHostname) {
|
||||
|
|
Loading…
Reference in a new issue