diff options
author | Secret Foxtail <remmy@megapahit.net> | 2025-07-28 05:23:18 -0600 |
---|---|---|
committer | Secret Foxtail <remmy@megapahit.net> | 2025-07-28 05:23:18 -0600 |
commit | c1adf320af2ca2afd9ed05cccc9031b99fc7ee60 (patch) | |
tree | 0e1f1e1e1d4d5b5010123b1c762f7969947f0ffa /indra/newview/llappviewer.cpp | |
parent | dbb0336d4a4739759371f52ab305fa2bd9237f3b (diff) |
Discord Rich Presence: Hide name & connect to llappviewer.cpp
Add option to show/hide avatar name in privacy panel & connect rich presense directly to llappviewer.cpp
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")) { |