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 55031
d3dbef0674c0
parent 55030
5193a188ca68
child 55032
a7bccfa8623c

MAINT-8203 Restore legacy name lookup

indra/newview/llimprocessing.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llimprocessing.cpp	Mon Apr 02 17:32:11 2018 +0300
     1.2 +++ b/indra/newview/llimprocessing.cpp	Fri Apr 06 14:15:11 2018 +0000
     1.3 @@ -1090,7 +1090,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 @@ -1157,6 +1157,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                  // <FS:Ansariel> Don't flash task icon

mercurial