summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupactions.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2023-02-08 14:56:38 +0100
committerKitty Barnett <develop@catznip.com>2023-02-08 14:56:38 +0100
commit7b563470fbade848d7eeb52d5088f3ca9b9c6905 (patch)
treedc3faed194d6ce8cc8d5b18175dfad17a1490cd8 /indra/newview/llgroupactions.cpp
parentf3cd329b585ef55a66f2a824f010d1a54d67d8d2 (diff)
parent8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff)
Merge branch 'main' into xcode-14.1
Diffstat (limited to 'indra/newview/llgroupactions.cpp')
-rw-r--r--indra/newview/llgroupactions.cpp46
1 files changed, 43 insertions, 3 deletions
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 84a1278767..be52e280e1 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -52,7 +52,32 @@ class LLGroupHandler : public LLCommandHandler
{
public:
// requires trusted browser to trigger
- LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_THROTTLE) { }
+ LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_CLICK_ONLY) { }
+
+ virtual bool canHandleUntrusted(
+ const LLSD& params,
+ const LLSD& query_map,
+ LLMediaCtrl* web,
+ const std::string& nav_type)
+ {
+ if (params.size() < 1)
+ {
+ return true; // don't block, will fail later
+ }
+
+ if (nav_type == NAV_TYPE_CLICKED)
+ {
+ return true;
+ }
+
+ const std::string verb = params[0].asString();
+ if (verb == "create")
+ {
+ return false;
+ }
+ return true;
+ }
+
bool handle(const LLSD& tokens, const LLSD& query_map,
LLMediaCtrl* web)
{
@@ -175,8 +200,7 @@ public:
virtual void processGroupData() = 0;
protected:
LLUUID mGroupId;
-private:
- bool mRequestProcessed;
+ bool mRequestProcessed;
};
class LLFetchLeaveGroupData: public LLFetchGroupMemberData
@@ -189,6 +213,22 @@ public:
{
LLGroupActions::processLeaveGroupDataResponse(mGroupId);
}
+ void changed(LLGroupChange gc)
+ {
+ if (gc == GC_PROPERTIES && !mRequestProcessed)
+ {
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupId);
+ if (!gdatap)
+ {
+ LL_WARNS() << "GroupData was NULL" << LL_ENDL;
+ }
+ else
+ {
+ processGroupData();
+ mRequestProcessed = true;
+ }
+ }
+ }
};
LLFetchLeaveGroupData* gFetchLeaveGroupData = NULL;