Skip to content

fix(people): correct friends list API endpoint for target users#103

Merged
tr4nt0r merged 2 commits intotr4nt0r:mainfrom
misiektoja:friends-list-fix-v2
Feb 28, 2026
Merged

fix(people): correct friends list API endpoint for target users#103
tr4nt0r merged 2 commits intotr4nt0r:mainfrom
misiektoja:friends-list-fix-v2

Conversation

@misiektoja
Copy link
Contributor

The get_friends_by_xuid method was incorrectly routing to /users/me/people/xuids({xuid})/ which only checks the relationship between the authenticated user and the target, returning empty data (0 friends) if they aren't mutual friends.
This fixes the URL path to /users/xuid({xuid})/people/friends/ as in Xbox Android app, correctly utilizing Xbox Live Contract v7 to fetch a target user's friends list.

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.31%. Comparing base (195fdcd) to head (ec89628).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
- Coverage   88.34%   88.31%   -0.03%     
==========================================
  Files          54       54              
  Lines        2857     2868      +11     
==========================================
+ Hits         2524     2533       +9     
- Misses        333      335       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Owner

@tr4nt0r tr4nt0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me, just the docstring should be updated. And the endpoint we are replacing is still needed, I think it is the only way to retrieve the own profile, or a single profile for the specified xuid. Would you like to add a new method, e.g. get_profile_by_xuid in a follow-up PR?

@misiektoja
Copy link
Contributor Author

Thanks, I've updated the docstring for get_friends_by_xuid.

Regarding the follow-up PR, I can implement that, but should I wait for the current fix to be merged into main before opening the follow-up or would you prefer me to open it against this branch now?

Copy link
Owner

@tr4nt0r tr4nt0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me merge this first. Thanks for your help 👍🏼

@tr4nt0r tr4nt0r merged commit dfc2bff into tr4nt0r:main Feb 28, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👻 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants