diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-07-12 21:49:15 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-07-12 21:49:15 +0800 |
commit | 74b0178b7b4d672c7f6b317102b0ecd26f1ea033 (patch) | |
tree | 64f0f01a6b47b534c42d7f4b085b8724e639937a /indra/newview/llviewermenu.cpp | |
parent | b1d2961edb593393da5ae88e275be7bb2568969b (diff) |
Download DiscordSocialSdk-1.4.9649.zip
https://discord.com/developers/applications/1393451183741599796/social-sdk/downloads
to your ~/Downloads folder.
Add -DUSE_DISCORD:BOOL=ON to your cmake line.
The authorisation is triggered by selecting Help > Discord Social.
It seems that the user will need to do this every time they want Rich
Presence support on the viewer while using Discord.
The Discord app is still set to be a public client in the OAuth2 tab,
I'm going to try to make it work with the app set to be a confidential
client, next.
All Discord-related code are contained within one file, llstartup.cpp,
and other classes access it through some opaque layer, static functions,
otherwise we'd get these "duplicate symbol" linking errors.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c3bb8ef4c4..4383fc87e5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8942,6 +8942,13 @@ void handle_report_bug(const LLSD& param) LLWeb::loadURLExternal(url); } +#ifdef LL_DISCORD +void handle_discord_social(const LLSD& param) +{ + LLStartUp::handleDiscordSocial(); +} +#endif + void handle_buy_currency_test() { std::string url = @@ -9920,6 +9927,9 @@ void initialize_menus() commit.add("Advanced.WebContentTest", boost::bind(&handle_web_content_test, _2)); // this one opens the Web Content floater commit.add("Advanced.ShowURL", boost::bind(&handle_show_url, _2)); commit.add("Advanced.ReportBug", boost::bind(&handle_report_bug, _2)); +#ifdef LL_DISCORD + commit.add("Advanced.DiscordSocial", boost::bind(&handle_discord_social, _2)); +#endif view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest"); view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); |