diff options
-rw-r--r-- | doc/contributions.txt | 1 | ||||
-rwxr-xr-x | indra/newview/llviewermessage.cpp | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index ede0018b99..4bcbd6326d 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -584,6 +584,7 @@ Jonathan Yap STORM-976 STORM-1639 STORM-910 + STORM-1653 STORM-1642 STORM-591 STORM-1105 diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ad333a71ff..d7c50ad9a4 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2235,6 +2235,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { name = LLTrans::getString("Unnamed"); } + + // Preserve the unaltered name for use in group notice mute checking. + std::string original_name = name; + // IDEVO convert new-style "Resident" names for display name = clean_name_from_im(name, dialog); @@ -2441,6 +2445,26 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) break; } + // 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. + U32 index = original_name.find(" Resident"); + if (index != std::string::npos) + { + original_name = original_name.substr(0, index); + } + std::string legacy_name = gCacheName->buildLegacyName(original_name); + LLUUID agent_id; + gCacheName->getUUID(legacy_name, agent_id); + + if (agent_id.isNull()) + { + LL_WARNS("Messaging") << "buildLegacyName returned null while processing " << original_name << LL_ENDL; + } + else if (LLMuteList::getInstance()->isMuted(agent_id)) + { + break; + } + notice_bin_bucket = (struct notice_bucket_full_t*) &binary_bucket[0]; U8 has_inventory = notice_bin_bucket->header.has_inventory; U8 asset_type = notice_bin_bucket->header.asset_type; |