diff options
| author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-22 20:51:14 +0300 | 
|---|---|---|
| committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-22 20:51:14 +0300 | 
| commit | 8bf2fb06218f24f95a7ff53df33b647b4ec088fc (patch) | |
| tree | 9affc1adc7792543103a858eb945633299339e9b /indra | |
| parent | c5bcb31d00cdac597ce6e406c253ba456e9436c8 (diff) | |
SL-10453 Unhelpful error message when trying to join a group you are already a member of
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llviewermessage.cpp | 27 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 1 | 
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. --> | 
