summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-31 17:47:07 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-31 17:47:07 +0300
commita6daa3a26d2b566df0a0563fc6d6c40fb385a1f0 (patch)
tree149e078a00a671c95c1f9d16c47a4ddd6447d7df /indra
parent302bfb6e81c28254b750392eea2468b434220bb3 (diff)
SL-19432 External group links dont load in SL
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagentlistener.cpp4
-rw-r--r--indra/newview/llcommanddispatcherlistener.cpp9
-rw-r--r--indra/newview/llcommandhandler.cpp2
-rw-r--r--indra/newview/llcommandhandler.h2
-rw-r--r--indra/newview/llgroupactions.cpp2
-rw-r--r--indra/newview/llstartup.cpp2
-rw-r--r--indra/newview/llurldispatcher.cpp4
-rwxr-xr-xindra/newview/llviewerregion.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp5
-rwxr-xr-xindra/newview/llworldmapview.cpp2
10 files changed, 22 insertions, 12 deletions
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index 7887184a11..b7f5aeb8e0 100644
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -148,7 +148,7 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const
params.append(event_data["x"]);
params.append(event_data["y"]);
params.append(event_data["z"]);
- LLCommandDispatcher::dispatch("teleport", params, LLSD(), NULL, "clicked", true);
+ LLCommandDispatcher::dispatch("teleport", params, LLSD(), NULL, LLCommandHandler::NAV_TYPE_CLICKED, true);
// *TODO - lookup other LLCommandHandlers for "agent", "classified", "event", "group", "floater", "parcel", "login", login_refresh", "balance", "chat"
// should we just compose LLCommandHandler and LLDispatchListener?
}
@@ -158,7 +158,7 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const
LLVector3(event_data["x"].asReal(),
event_data["y"].asReal(),
event_data["z"].asReal())).getSLURLString();
- LLURLDispatcher::dispatch(url, "clicked", NULL, false);
+ LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, NULL, false);
}
}
diff --git a/indra/newview/llcommanddispatcherlistener.cpp b/indra/newview/llcommanddispatcherlistener.cpp
index 586f45fd8f..518f5bc374 100644
--- a/indra/newview/llcommanddispatcherlistener.cpp
+++ b/indra/newview/llcommanddispatcherlistener.cpp
@@ -64,8 +64,13 @@ void LLCommandDispatcherListener::dispatch(const LLSD& params) const
// But for testing, allow a caller to specify untrusted.
trusted_browser = params["trusted"].asBoolean();
}
- LLCommandDispatcher::dispatch(params["cmd"], params["params"], params["query"], NULL,
- "clicked", trusted_browser);
+ LLCommandDispatcher::dispatch(
+ params["cmd"],
+ params["params"],
+ params["query"],
+ NULL,
+ LLCommandHandler::NAV_TYPE_CLICKED,
+ trusted_browser);
}
void LLCommandDispatcherListener::enumerate(const LLSD& params) const
diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp
index 74f37961c7..9640b05b06 100644
--- a/indra/newview/llcommandhandler.cpp
+++ b/indra/newview/llcommandhandler.cpp
@@ -40,6 +40,8 @@
static LLCommandDispatcherListener sCommandDispatcherListener;
const std::string LLCommandHandler::NAV_TYPE_CLICKED = "clicked";
+const std::string LLCommandHandler::NAV_TYPE_EXTERNAL = "external";
+const std::string LLCommandHandler::NAV_TYPE_NAVIGATED = "navigated";
//---------------------------------------------------------------------------
// Underlying registry for command handlers, not directly accessible.
diff --git a/indra/newview/llcommandhandler.h b/indra/newview/llcommandhandler.h
index 763e3ee51f..486feecca6 100644
--- a/indra/newview/llcommandhandler.h
+++ b/indra/newview/llcommandhandler.h
@@ -70,6 +70,8 @@ public:
};
static const std::string NAV_TYPE_CLICKED;
+ static const std::string NAV_TYPE_EXTERNAL;
+ static const std::string NAV_TYPE_NAVIGATED;
LLCommandHandler(const char* command, EUntrustedAccess untrusted_access);
// Automatically registers object to get called when
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index be52e280e1..aec6c23e34 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -52,7 +52,7 @@ class LLGroupHandler : public LLCommandHandler
{
public:
// requires trusted browser to trigger
- LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_CLICK_ONLY) { }
+ LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_THROTTLE) { }
virtual bool canHandleUntrusted(
const LLSD& params,
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 765aca039d..628ee5d97c 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -3018,7 +3018,7 @@ bool LLStartUp::dispatchURL()
|| (dx*dx > SLOP*SLOP)
|| (dy*dy > SLOP*SLOP) )
{
- LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), "clicked",
+ LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), LLCommandHandler::NAV_TYPE_CLICKED,
NULL, false);
}
return true;
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index 7c92e7ef98..0da769999b 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -142,7 +142,7 @@ bool LLURLDispatcherImpl::dispatchRightClick(const LLSLURL& slurl)
const bool right_click = true;
LLMediaCtrl* web = NULL;
const bool trusted_browser = false;
- return dispatchCore(slurl, "clicked", right_click, web, trusted_browser);
+ return dispatchCore(slurl, LLCommandHandler::NAV_TYPE_CLICKED, right_click, web, trusted_browser);
}
// static
@@ -397,7 +397,7 @@ bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl, bool trus
// *TODO: Make this trust model more refined. JC
LLMediaCtrl* web = NULL;
- return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), "clicked", web, trusted_content);
+ return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), LLCommandHandler::NAV_TYPE_CLICKED, web, trusted_content);
}
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index ad7321ca4b..b582e38c78 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -160,7 +160,7 @@ public:
}
// Process the SLapp as if it was a secondlife://{PLACE} SLurl
- LLURLDispatcher::dispatch(url, "clicked", web, true);
+ LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, web, true);
return true;
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index ddc11ac0bd..b9fcc25310 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -39,6 +39,7 @@
#include "llagent.h"
#include "llagentcamera.h"
+#include "llcommandhandler.h"
#include "llcommunicationchannel.h"
#include "llfloaterreg.h"
#include "llhudicon.h"
@@ -1296,7 +1297,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
{
if (drop)
{
- LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), "clicked", NULL, true );
+ LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), LLCommandHandler::NAV_TYPE_CLICKED, NULL, true );
return LLWindowCallbacks::DND_MOVE;
}
return LLWindowCallbacks::DND_COPY;
@@ -1765,7 +1766,7 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data)
LLMediaCtrl* web = NULL;
const bool trusted_browser = false;
// don't treat slapps coming from external browsers as "clicks" as this would bypass throttling
- if (LLURLDispatcher::dispatch(url, "", web, trusted_browser))
+ if (LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_EXTERNAL, web, trusted_browser))
{
// bring window to foreground, as it has just been "launched" from a URL
mWindow->bringToFront();
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 6e994b4e68..8f46e66551 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1829,7 +1829,7 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
// Invoke the event details floater if someone is clicking on an event.
LLSD params(LLSD::emptyArray());
params.append(event_id);
- LLCommandDispatcher::dispatch("event", params, LLSD(), NULL, "clicked", true);
+ LLCommandDispatcher::dispatch("event", params, LLSD(), NULL, LLCommandHandler::NAV_TYPE_CLICKED, true);
break;
}
case MAP_ITEM_LAND_FOR_SALE: