diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index d7feba7e04..4b098ee074 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -602,12 +602,47 @@ bool LLGroupActions::canEjectFromGroup(const LLUUID& idGroup, const LLUUID& idAg
void LLGroupActions::ejectFromGroup(const LLUUID& idGroup, const LLUUID& idAgent)
{
- if (!canEjectFromGroup(idGroup, idAgent))
- return;
+ // FIRE-8499 - Eject from group confirmation
+ //if (!canEjectFromGroup(idGroup, idAgent))
+ // return;
- uuid_vec_t idAgents;
- idAgents.push_back(idAgent);
- LLGroupMgr::instance().sendGroupMemberEjects(idGroup, idAgents);
+ //uuid_vec_t idAgents;
+ //idAgents.push_back(idAgent);
+ //LLGroupMgr::instance().sendGroupMemberEjects(idGroup, idAgents);
+ LLSD args;
+ LLSD payload;
+ payload["avatar_id"] = idAgent;
+ payload["group_id"] = idGroup;
+ std::string fullname;
+ gCacheName->getFullName(idAgent, fullname);
+ args["AVATAR_NAME"] = fullname;
+ LLNotificationsUtil::add("EjectGroupMemberWarning",
+ args,
+ payload,
+ callbackEject);
+}
+
+bool LLGroupActions::callbackEject(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (2 == option) // Cancel button
+ {
+ return false;
+ }
+ if (0 == option) // Eject button
+ {
+ LLUUID idAgent = notification["payload"]["avatar_id"].asUUID();
+ LLUUID idGroup = notification["payload"]["group_id"].asUUID();
+
+ if (!canEjectFromGroup(idGroup, idAgent))
+ return false;
+
+ uuid_vec_t idAgents;
+ idAgents.push_back(idAgent);
+ LLGroupMgr::instance().sendGroupMemberEjects(idGroup, idAgents);
+ }
+ return false;
+ //
}
// [/SL:KB]
diff --git a/indra/newview/llgroupactions.h b/indra/newview/llgroupactions.h
index eeeda7f09d..b4b16d67e9 100644
--- a/indra/newview/llgroupactions.h
+++ b/indra/newview/llgroupactions.h
@@ -118,6 +118,7 @@ public:
static bool canEjectFromGroup(const LLUUID& idGroup, const LLUUID& idAgent);
static void ejectFromGroup(const LLUUID& idGroup, const LLUUID& idAgent);
// [/SL:KB]
+ static bool callbackEject(const LLSD& notification, const LLSD& response); // FIRE-8499 - Eject from group confirmation
private:
static bool onJoinGroup(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 49dc59f83e..04dd702eea 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -11141,4 +11141,18 @@ You cannot undo this action.
notext="Cancel"
yestext="OK"/>
+
+
+You are about to eject [AVATAR_NAME] from the group.
+ group
+ confirm
+
+