summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
authorPaul Guslisty <pguslisty@productengine.com>2010-03-25 09:04:01 +0200
committerPaul Guslisty <pguslisty@productengine.com>2010-03-25 09:04:01 +0200
commitd5d9668a59895874951fb3e5927ea0159270a6e8 (patch)
tree399972f600e972976bc08982b7024d76c6c4e435 /indra/newview/llavataractions.cpp
parent7fa6e0ad6c7a916b45ca1ff7f6603ca2a5726a97 (diff)
Fixed low bug EXT-6488 (Teleport menuitem is enabled for offline residents in the context menu and inspectors)
- Added a check for a teleport offer ability. In XML created a paremeter and check it in source code. Reviewed by Leyla Farazha at https://codereview.productengine.com/secondlife/r/86/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index cb518f0ad6..699916b0d6 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -442,6 +442,20 @@ void LLAvatarActions::toggleBlock(const LLUUID& id)
LLMuteList::getInstance()->add(mute);
}
}
+// static
+bool LLAvatarActions::canOfferTeleport(const LLUUID& id)
+{
+ // First use LLAvatarTracker::isBuddy()
+ // If LLAvatarTracker::instance().isBuddyOnline function only is used
+ // then for avatars that are online and not a friend it will return false.
+ // But we should give an ability to offer a teleport for such avatars.
+ if(LLAvatarTracker::instance().isBuddy(id))
+ {
+ return LLAvatarTracker::instance().isBuddyOnline(id);
+ }
+
+ return true;
+}
void LLAvatarActions::inviteToGroup(const LLUUID& id)
{