You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @leobrines — hope you don't mind, I picked this up to try to land it. The gap you identified is still present on master 2+ years later, so the underlying fix is still needed.
The follow-up PR is #644. Two changes vs. your original patch, with reasoning:
Decode the body once and unmarshal the player into both the typed struct and u.RawData instead of marshalling the typed struct back to JSON and decoding that into the map. Your approach worked correctly but it made RawData a strict duplicate of the six typed fields (steamid, personaname, realname, avatarfull, loccountrycode, locstatecode) — so callers still couldn't reach communityvisibilitystate, timecreated, primaryclanid, profileurl, etc. The new approach exposes the full Steam player payload, which is what RawData does in every other goth provider (auth0, discord, etc.).
Expanded the test fixture beyond the six fields you used to a realistic Steam player payload, and added RawData assertions for the no-slot fields. This way a future refactor can't silently shrink the response again — which is, I suspect, exactly the kind of latent regression that left this PR sitting for two years.
Your httpTestTransport indirection and the testUserSummaryBody structure are preserved as-is, those were already the right design. Credit to you for the original analysis and the test infrastructure — both still load-bearing here.
Suggest closing this in favour of #644 once it lands.
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
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.
Fixed empty raw data in user response when you use Steam provider.