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/newview/llviewermessage.cpp | |
| parent | c5bcb31d00cdac597ce6e406c253ba456e9436c8 (diff) | |
SL-10453 Unhelpful error message when trying to join a group you are already a member of
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
| -rw-r--r-- | indra/newview/llviewermessage.cpp | 27 |
1 files changed, 21 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; |
