From db643d1881196c01687b06130f26452cd2e04bac Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 26 Oct 2011 11:21:01 -0400 Subject: STORM-1653 Group notices sent by muted residents are still displayed --- indra/newview/llviewermessage.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 74ee918bfe..fe613b3dc9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2241,6 +2241,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); @@ -2447,6 +2451,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) break; } + // The group notice packet does not have an AgentID. Try to obtain one from the name cache. + // If there is a cache miss and a background fetch has to occur the group notice may + // be displayed even though the resident has been muted. + std::string legacy_name = gCacheName->buildLegacyName(original_name); + LLUUID agent_id; + gCacheName->getUUID(legacy_name, agent_id); + if (agent_id.notNull() && 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; -- cgit v1.2.3 From f73fddd5d0c5a398a592dcc058b1feb09964560d Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 26 Oct 2011 14:06:08 -0400 Subject: STORM-1653 Group notices sent by muted residents are still displayed Added warning message if a null is returned from the name to id call. --- indra/newview/llviewermessage.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index fe613b3dc9..05303cf3c5 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2451,13 +2451,16 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) break; } - // The group notice packet does not have an AgentID. Try to obtain one from the name cache. - // If there is a cache miss and a background fetch has to occur the group notice may - // be displayed even though the resident has been muted. + // The group notice packet does not have an AgentID. Obtain one from the name cache. std::string legacy_name = gCacheName->buildLegacyName(original_name); LLUUID agent_id; gCacheName->getUUID(legacy_name, agent_id); - if (agent_id.notNull() && LLMuteList::getInstance()->isMuted(agent_id)) + + if (agent_id.isNull()) + { + LL_WARNS("Messaging") << "buildLegacyName returned null" << LL_ENDL; + } + else if (LLMuteList::getInstance()->isMuted(agent_id)) { break; } -- cgit v1.2.3 From 0ab252b8174a97311168938e93c99c0d649660ad Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 23 Nov 2011 09:51:38 -0500 Subject: STORM-1653 Handle last name of "Resident" case --- indra/newview/llviewermessage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 05303cf3c5..c92fc5c853 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2452,6 +2452,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } // 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); -- cgit v1.2.3 From 28f86906a6c0675c6335ca7f408c4e0561dafd89 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 6 Dec 2011 11:45:07 -0500 Subject: STORM-1653 Added affected name to warning message --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c92fc5c853..39c863318b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2464,7 +2464,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (agent_id.isNull()) { - LL_WARNS("Messaging") << "buildLegacyName returned null" << LL_ENDL; + LL_WARNS("Messaging") << "buildLegacyName returned null while processing " << original_name << LL_ENDL; } else if (LLMuteList::getInstance()->isMuted(agent_id)) { -- cgit v1.2.3 From 7f85f6be6af92868faeaf38b60accd3a3ab4491a Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 12 Dec 2011 20:07:34 -0500 Subject: VWR-27832 L$ Transfer failures show alert as if successful --- indra/newview/llviewermessage.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ad333a71ff..2f2c711073 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5206,6 +5206,7 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) BOOL is_dest_group = FALSE; S32 amount = 0; std::string item_description; + BOOL success = FALSE; msg->getS32("TransactionInfo", "TransactionType", transaction_type); msg->getUUID("TransactionInfo", "SourceID", source_id); @@ -5214,6 +5215,7 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) msg->getBOOL("TransactionInfo", "IsDestGroup", is_dest_group); msg->getS32("TransactionInfo", "Amount", amount); msg->getString("TransactionInfo", "ItemDescription", item_description); + msg->getBOOL("MoneyData", "TransactionSuccess", success); LL_INFOS("Money") << "MoneyBalanceReply source " << source_id << " dest " << dest_id << " type " << transaction_type @@ -5275,28 +5277,32 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) { if (dest_id.notNull()) { - message = LLTrans::getString("you_paid_ldollars", args); + message = success ? LLTrans::getString("you_paid_ldollars", args) : + LLTrans::getString("you_paid_failure_ldollars", args); } else { // transaction fee to the system, eg, to create a group - message = LLTrans::getString("you_paid_ldollars_no_name", args); + message = success ? LLTrans::getString("you_paid_ldollars_no_name", args) : + LLTrans::getString("you_paid_failure_ldollars_no_name", args); } } else { if (dest_id.notNull()) { - message = LLTrans::getString("you_paid_ldollars_no_reason", args); + message = success ? LLTrans::getString("you_paid_ldollars_no_reason", args) : + LLTrans::getString("you_paid_failure_ldollars_no_reason", args); } else { // no target, no reason, you just paid money - message = LLTrans::getString("you_paid_ldollars_no_info", args); + message = success ? LLTrans::getString("you_paid_ldollars_no_info", args) : + LLTrans::getString("you_paid_failure_ldollars_no_info", args); } } final_args["MESSAGE"] = message; - notification = "PaymentSent"; + notification = success ? "PaymentSent" : "PaymentFailure"; } else { // ...someone paid you -- cgit v1.2.3