diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2018-04-06 14:15:11 +0000 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2018-04-06 14:15:11 +0000 | 
| commit | b5d72cf657d2530025fa7b946077153736a27e46 (patch) | |
| tree | 11f2e804d0a9e46575de223acbeb52ff8fcf0f56 | |
| parent | 3c7744133884e1a9327165749e1b19d407ca0d45 (diff) | |
MAINT-8203 Restore legacy name lookup
| -rw-r--r-- | indra/newview/llimprocessing.cpp | 25 | 
1 files changed, 24 insertions, 1 deletions
| diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index da0c218f9f..db1bc56fc5 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -647,7 +647,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; @@ -712,6 +712,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; | 
