Conversation
Replace Discord's proprietary C++ Social SDK (discord_partner_sdk.aar) with a direct Discord Gateway WebSocket connection using OAuth2 bearer tokens, based on the sang765/Discord-OAuth2-RPC approach. Deleted: - app/libs/discord_partner_sdk.aar (proprietary AAR) - app/src/main/cpp/ (CMakeLists.txt, discord_social_bridge.cpp) - DiscordSocialNativeBridge.kt, DiscordSocialSdkAndroidInitializer.kt Added: - GatewayClient.kt - OkHttp WebSocket client (identify/heartbeat/presence) - GatewayModels.kt, GatewayUtils.kt - gateway data structures Modified: - DiscordSocialPresenceClient.kt - uses GatewayClient instead of JNI - DiscordPresenceManager.kt - removed native callback polling - DiscordRPC.kt, MainActivity.kt - signature/import cleanups - build.gradle.kts - removed CMake/AAR deps, added org.json - proguard-rules.pro - removed SDK keep rules
Code Review SummaryStatus: 5 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Other Observations (not in diff)
Files Reviewed (5 files)
Reviewed by step-3.7-flash-20260528 · 37,325 tokens |
Discord Gateway protocol requires image URLs to be registered via the
external-assets REST API before they can be used in presence updates.
The old C++ Social SDK handled this transparently; the Gateway approach
needs explicit registration.
- Added DiscordAssetRegistrar: caches URL-to-external_asset_path mappings,
registers external image URLs via POST /applications/{id}/external-assets,
and handles all image types (snowflakes, mp: prefixes, Discord CDN, raw)
- Updated DiscordSocialPresenceClient.buildPresencePayload to resolve images
through the registrar before building the presence JSON
- Clears asset cache on client close
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace Discord's proprietary C++ Social SDK (discord_partner_sdk.aar) with a direct Discord Gateway WebSocket connection using OAuth2 bearer tokens, based on the sang765/Discord-OAuth2-RPC approach.
Deleted:
Added:
Modified: