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>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>URL for SL Web Profiles</string>
|
||||
<string>URL for Web Profiles</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
@@ -7822,17 +7822,6 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<string>https://my.secondlife.com/[AGENT_NAME]</string>
|
||||
</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>
|
||||
<map>
|
||||
<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 url;
|
||||
|
||||
if (gHippoGridManager->getConnectedGrid()->isInProductionGrid())
|
||||
{
|
||||
url = gSavedSettings.getString("WebProfileURL");
|
||||
}
|
||||
else
|
||||
{
|
||||
url = gSavedSettings.getString("WebProfileNonProductionURL");
|
||||
}
|
||||
std::string url = gSavedSettings.getString("WebProfileURL");
|
||||
LLSD subs;
|
||||
subs["AGENT_NAME"] = agent_name;
|
||||
url = LLWeb::expandURLSubstitutions(url,subs);
|
||||
|
||||
@@ -4281,6 +4281,18 @@ bool process_login_success_response(std::string& password)
|
||||
gSavedSettings.setString("MapServerURL", map_server_url);
|
||||
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.
|
||||
LLSD initial_outfit = response["initial-outfit"][0];
|
||||
if(initial_outfit.size())
|
||||
|
||||
Reference in New Issue
Block a user