diff options
author | Eric M. Tulla (BigPapi) <tulla@lindenlab.com> | 2009-12-15 15:41:51 -0500 |
---|---|---|
committer | Eric M. Tulla (BigPapi) <tulla@lindenlab.com> | 2009-12-15 15:41:51 -0500 |
commit | 08495d3f63e1e926e44185be07269ed40363024a (patch) | |
tree | 8e32278f96a14b36a4215e7fac16f68d072da961 /indra/newview/llavataractions.cpp | |
parent | 870d4449f5eec1c2a7e5e4627a0433846ab256aa (diff) | |
parent | 06f8017674295191d3c4400eacb36e34a167ffa5 (diff) |
Merging in latest PE changes from https://hg.aws.productengine.com/secondlife/viewer-2-0/
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r-- | indra/newview/llavataractions.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 5f90a7627f..33dc7ee2c8 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -61,6 +61,7 @@ #include "llviewerregion.h" #include "llimfloater.h" #include "lltrans.h" +#include "llcallingcard.h" // static void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name) @@ -265,6 +266,24 @@ bool LLAvatarActions::isCalling(const LLUUID &id) return (LLIMModel::getInstance()->findIMSession(session_id) != NULL); } +//static +bool LLAvatarActions::canCall(const LLUUID &id) +{ + if(isFriend(id)) + { + return LLAvatarTracker::instance().isBuddyOnline(id) && LLVoiceClient::voiceEnabled(); + } + else + { + // don't need to check online/offline status because "usual resident" (resident that is not a friend) + // can be only ONLINE. There is no way to see "usual resident" in OFFLINE status. If we see "usual + // resident" it automatically means that the resident is ONLINE. So to make a call to the "usual resident" + // we need to check only that "our" voice is enabled. + return LLVoiceClient::voiceEnabled(); + } + +} + // static void LLAvatarActions::startConference(const std::vector<LLUUID>& ids) { |