diff options
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index caf56d5c79..2ea8b65ee1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5938,10 +5938,10 @@ void LLAppViewer::initDiscordSocial() } } -void LLAppViewer::handleDiscordSocial(bool enable) +void LLAppViewer::handleDiscordSocial(const LLSD& value) { static const uint64_t APPLICATION_ID = 1393451183741599796; - if (enable) + if (value.asBoolean()) { discordpp::AuthorizationArgs args{}; args.SetClientId(APPLICATION_ID); @@ -5986,13 +5986,16 @@ void LLAppViewer::updateDiscordActivity() discordpp::Activity activity; activity.SetType(discordpp::ActivityTypes::Playing); - LLAvatarName av_name; - LLAvatarNameCache::get(gAgent.getID(), &av_name); - auto name = av_name.getUserName(); - auto displayName = av_name.getDisplayName(); - if (name != displayName) - name = displayName + " (" + name + ")"; - activity.SetDetails(name); + if (gSavedSettings.getBOOL("ShowDiscordActivityDetails")) + { + LLAvatarName av_name; + LLAvatarNameCache::get(gAgent.getID(), &av_name); + auto name = av_name.getUserName(); + auto displayName = av_name.getDisplayName(); + if (name != displayName) + name = displayName + " (" + name + ")"; + activity.SetDetails(name); + } if (gSavedSettings.getBOOL("ShowDiscordActivityState")) { |