summaryrefslogtreecommitdiff
path: root/indra/newview/llimprocessing.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2018-04-12 21:24:36 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2018-04-12 21:24:36 +0300
commit46817fcbd3133cd27dee27309ff20f12ce4ce7b0 (patch)
tree1fc5fc341f4af30e6a11d9b4351560e1a3d5c384 /indra/newview/llimprocessing.cpp
parent31a2379607af21730e854773613e71c80a8caa0b (diff)
parent8c67f588da1031ef6e468a7ab5eeb19020b0298c (diff)
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/llimprocessing.cpp')
-rw-r--r--indra/newview/llimprocessing.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 9a11680d42..491671c46f 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -615,7 +615,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
{
LL_INFOS("Messaging") << "Received IM_GROUP_NOTICE message." << LL_ENDL;
- LLUUID agent_id = from_id;
+ LLUUID agent_id;
U8 has_inventory;
U8 asset_type = 0;
LLUUID group_id;
@@ -680,6 +680,29 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
item_name = ll_safe_string((const char*)notice_bin_bucket->item_name);
}
+ if (group_id != from_id)
+ {
+ agent_id = from_id;
+ }
+ else
+ {
+ S32 index = original_name.find(" Resident");
+ if (index != std::string::npos)
+ {
+ original_name = original_name.substr(0, index);
+ }
+
+ // The group notice packet does not have an AgentID. Obtain one from the name cache.
+ // If last name is "Resident" strip it out so the cache name lookup works.
+ std::string legacy_name = gCacheName->buildLegacyName(original_name);
+ agent_id = LLAvatarNameCache::findIdByName(legacy_name);
+
+ if (agent_id.isNull())
+ {
+ LL_WARNS("Messaging") << "buildLegacyName returned null while processing " << original_name << LL_ENDL;
+ }
+ }
+
if (agent_id.notNull() && LLMuteList::getInstance()->isMuted(agent_id))
{
break;