From 9662dced09102a978dec67967a5ad8b994463a7e Mon Sep 17 00:00:00 2001 From: MarcelEdward Date: Wed, 3 Sep 2014 16:59:00 +0200 Subject: [PATCH] This patch updates the MyAvatar.cpp file. It adds a check MyAvatar::goToLocationFromResponse to see if the user is online, if the teleport to the avatar is done and if not a message is shown which said that the user is not online --- interface/src/avatar/MyAvatar.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index e51390f9d0..5f1b81fb14 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -1897,7 +1897,12 @@ void MyAvatar::resetSize() { void MyAvatar::goToLocationFromResponse(const QJsonObject& jsonObject) { QJsonObject locationObject = jsonObject["data"].toObject()["address"].toObject(); - goToLocationFromAddress(locationObject); + bool isOnline = jsonObject["data"].toObject()["online"].toBool(); + if (isOnline ) { + goToLocationFromAddress(locationObject); + } else { + QMessageBox::warning(Application::getInstance()->getWindow(), "", "The user is not online."); + } } void MyAvatar::goToLocationFromAddress(const QJsonObject& locationObject) {