Support web_profile_url response from OSGrid servers for setting WebProfileURL
This commit is contained in:
@@ -7814,7 +7814,7 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>WebProfileURL</key>
|
<key>WebProfileURL</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>URL for SL Web Profiles</string>
|
<string>URL for Web Profiles</string>
|
||||||
<key>Persist</key>
|
<key>Persist</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
@@ -7822,17 +7822,6 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<string>https://my.secondlife.com/[AGENT_NAME]</string>
|
<string>https://my.secondlife.com/[AGENT_NAME]</string>
|
||||||
</map>
|
</map>
|
||||||
<key>WebProfileNonProductionURL</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>URL for SL Web Profiles on Non-Production grids</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>0</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>String</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<string>https://my-demo.secondlife.com/[AGENT_NAME]</string>
|
|
||||||
</map>
|
|
||||||
<key>HighResSnapshot</key>
|
<key>HighResSnapshot</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -47,16 +47,7 @@ static const std::string PANEL_PICKS = "panel_picks";
|
|||||||
|
|
||||||
std::string getProfileURL(const std::string& agent_name)
|
std::string getProfileURL(const std::string& agent_name)
|
||||||
{
|
{
|
||||||
std::string url;
|
std::string url = gSavedSettings.getString("WebProfileURL");
|
||||||
|
|
||||||
if (gHippoGridManager->getConnectedGrid()->isInProductionGrid())
|
|
||||||
{
|
|
||||||
url = gSavedSettings.getString("WebProfileURL");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
url = gSavedSettings.getString("WebProfileNonProductionURL");
|
|
||||||
}
|
|
||||||
LLSD subs;
|
LLSD subs;
|
||||||
subs["AGENT_NAME"] = agent_name;
|
subs["AGENT_NAME"] = agent_name;
|
||||||
url = LLWeb::expandURLSubstitutions(url,subs);
|
url = LLWeb::expandURLSubstitutions(url,subs);
|
||||||
|
|||||||
@@ -4281,6 +4281,18 @@ bool process_login_success_response(std::string& password)
|
|||||||
gSavedSettings.setString("MapServerURL", map_server_url);
|
gSavedSettings.setString("MapServerURL", map_server_url);
|
||||||
LLWorldMap::gotMapServerURL(true);
|
LLWorldMap::gotMapServerURL(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(gHippoGridManager->getConnectedGrid()->isOpenSimulator())
|
||||||
|
{
|
||||||
|
std::string web_profile_url = response["web_profile_url"];
|
||||||
|
if(!web_profile_url.empty())
|
||||||
|
gSavedSettings.setString("WebProfileURL", web_profile_url);
|
||||||
|
}
|
||||||
|
else if(!gHippoGridManager->getConnectedGrid()->isInProductionGrid())
|
||||||
|
{
|
||||||
|
gSavedSettings.setString("WebProfileURL", "https://my-demo.secondlife.com/[AGENT_NAME]");
|
||||||
|
}
|
||||||
|
|
||||||
// Initial outfit for the user.
|
// Initial outfit for the user.
|
||||||
LLSD initial_outfit = response["initial-outfit"][0];
|
LLSD initial_outfit = response["initial-outfit"][0];
|
||||||
if(initial_outfit.size())
|
if(initial_outfit.size())
|
||||||
|
|||||||
Reference in New Issue
Block a user