From 8bf2fb06218f24f95a7ff53df33b647b4ec088fc Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 22 Jul 2019 20:51:14 +0300 Subject: SL-10453 Unhelpful error message when trying to join a group you are already a member of --- indra/newview/llviewermessage.cpp | 27 ++++++++++++++++++++------ indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index cf5f2e284f..5b9c39af9f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5153,12 +5153,27 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) } } - // Error Notification can come with and without reason - if (notificationID == "JoinGroupError" && llsdBlock.has("reason")) - { - LLNotificationsUtil::add("JoinGroupErrorReason", llsdBlock); - return true; - } + // Error Notification can come with and without reason + if (notificationID == "JoinGroupError") + { + if (llsdBlock.has("reason")) + { + LLNotificationsUtil::add("JoinGroupErrorReason", llsdBlock); + return true; + } + if (llsdBlock.has("group_id")) + { + LLGroupData agent_gdatap; + bool is_member = gAgent.getGroupData(llsdBlock["group_id"].asUUID(), agent_gdatap); + if (is_member) + { + LLSD args; + args["reason"] = LLTrans::getString("AlreadyInGroup"); + LLNotificationsUtil::add("JoinGroupErrorReason", args); + return true; + } + } + } LLNotificationsUtil::add(notificationID, llsdBlock); return true; diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 71ab490547..2bf3f96ea7 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2634,6 +2634,7 @@ If you continue to receive this message, please contact Second Life support for Debits Total No group data found for group + You are already in this group -- cgit v1.2.3