summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroupinvite.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2015-11-25 19:22:13 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2015-11-25 19:22:13 +0200
commit01fb8a6bfe7f768e25634f1755a334f370534652 (patch)
treef120b06cba15b4a19737af58f46eb9a09834ee18 /indra/newview/llpanelgroupinvite.cpp
parentd47870a9c1f37d9bea88e1ea70fc0b8c78633d1d (diff)
MAINT-5903 FIXED Resident's name is not automatically filled into the resident chooser for the group invite
if he isn't in the friends list and not in the same region
Diffstat (limited to 'indra/newview/llpanelgroupinvite.cpp')
-rwxr-xr-xindra/newview/llpanelgroupinvite.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 866cb8dbef..82ea8377de 100755
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -501,25 +501,22 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids)
}
else
{
- //looks like user try to invite offline friend
+ //looks like user try to invite offline avatar (or the avatar from the other region)
//for offline avatar_id gObjectList.findObject() will return null
//so we need to do this additional search in avatar tracker, see EXT-4732
- if (LLAvatarTracker::instance().isBuddy(agent_id))
+ LLAvatarName av_name;
+ if (!LLAvatarNameCache::get(agent_id, &av_name))
{
- LLAvatarName av_name;
- if (!LLAvatarNameCache::get(agent_id, &av_name))
- {
- // actually it should happen, just in case
- //LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupInvite::addUserCallback, this, _1, _2));
- // for this special case!
- //when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
- // removed id will be added in callback
- agent_ids.erase(agent_ids.begin() + i);
- }
- else
- {
- names.push_back(av_name.getAccountName());
- }
+ // actually it should happen, just in case
+ //LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupInvite::addUserCallback, this, _1, _2));
+ // for this special case!
+ //when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
+ // removed id will be added in callback
+ agent_ids.erase(agent_ids.begin() + i);
+ }
+ else
+ {
+ names.push_back(av_name.getAccountName());
}
}
}