MAINT-8203 Restore legacy name lookup

Fri, 06 Apr 2018 14:15:11 +0000

author
Andrey Kleshchev <andreykproductengine@lindenlab.com>
date
Fri, 06 Apr 2018 14:15:11 +0000
changeset 55363
1e9828e37a4d
parent 55362
fa6fe26faa78
child 55364
f34afa48bc19
child 55366
48189ac2268d

MAINT-8203 Restore legacy name lookup

indra/newview/llimprocessing.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llimprocessing.cpp	Thu Apr 05 20:23:17 2018 -0700
     1.2 +++ b/indra/newview/llimprocessing.cpp	Fri Apr 06 14:15:11 2018 +0000
     1.3 @@ -647,7 +647,7 @@
     1.4          {
     1.5              LL_INFOS("Messaging") << "Received IM_GROUP_NOTICE message." << LL_ENDL;
     1.6  
     1.7 -            LLUUID agent_id = from_id;
     1.8 +            LLUUID agent_id;
     1.9              U8 has_inventory;
    1.10              U8 asset_type = 0;
    1.11              LLUUID group_id;
    1.12 @@ -712,6 +712,29 @@
    1.13                  item_name = ll_safe_string((const char*)notice_bin_bucket->item_name);
    1.14              }
    1.15  
    1.16 +            if (group_id != from_id)
    1.17 +            {
    1.18 +                agent_id = from_id;
    1.19 +            }
    1.20 +            else
    1.21 +            {
    1.22 +                S32 index = original_name.find(" Resident");
    1.23 +                if (index != std::string::npos)
    1.24 +                {
    1.25 +                    original_name = original_name.substr(0, index);
    1.26 +                }
    1.27 +
    1.28 +                // The group notice packet does not have an AgentID.  Obtain one from the name cache.
    1.29 +                // If last name is "Resident" strip it out so the cache name lookup works.
    1.30 +                std::string legacy_name = gCacheName->buildLegacyName(original_name);
    1.31 +                agent_id = LLAvatarNameCache::findIdByName(legacy_name);
    1.32 +
    1.33 +                if (agent_id.isNull())
    1.34 +                {
    1.35 +                    LL_WARNS("Messaging") << "buildLegacyName returned null while processing " << original_name << LL_ENDL;
    1.36 +                }
    1.37 +            }
    1.38 +
    1.39              if (agent_id.notNull() && LLMuteList::getInstance()->isMuted(agent_id))
    1.40              {
    1.41                  break;

mercurial