summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llviewermessage.cpp27
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml1
2 files changed, 22 insertions, 6 deletions
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
<string name="Debits">Debits</string>
<string name="Total">Total</string>
<string name="NoGroupDataFound">No group data found for group </string>
+ <string name="AlreadyInGroup">You are already in this group </string>
<!-- floater IM bonus_info: When a Linden with Admin/god status receives a new IM this displays the estate (Mainland vs. teen grid) of the source avatar.
This is to help Lindens when answering questions. -->