Skip to content

Commit 7ec9cae

Browse files
committed
fixed fetch_user_by_display_name not returning external auths
1 parent ac8f05c commit 7ec9cae

3 files changed

Lines changed: 11 additions & 24 deletions

File tree

docs/changelog.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Changelog
66
Detailed version changes.
77
You can also view the changelog of the original library, fortnitepy, `here <https://fortnitepy.readthedocs.io/en/latest/changelog.html>`_.
88

9-
v0.9.5 (pre-release)
9+
v0.9.5
1010
------
1111

1212
Added
@@ -17,6 +17,12 @@ Added
1717
- Added :meth:`ClientPartyMember.set_jam_emote()`
1818
- Added :meth:`ClientPartyMember.set_instruments()`
1919

20+
Bug Fixes
21+
~~~~~
22+
23+
- Fixed an issue where ``Client.user`` couldn't be created.
24+
- Fixed :meth:`Client.fetch_user_by_display_name()` not fetching ``external_auths``.
25+
2026
v0.9.4
2127
------
2228

rebootpy/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -996,16 +996,17 @@ async def fetch_user_by_display_name(self, display_name: str, *,
996996
pass
997997

998998
try:
999-
data = await self.http.account_get_by_display_name(display_name)
999+
lookup = await self.http.account_get_by_display_name(display_name)
1000+
data = await self.http.account_get_multiple_by_user_id([lookup.get('id')])
10001001
except HTTPException as e:
10011002
error_code = 'errors.com.epicgames.account.account_not_found'
10021003
if e.message_code == error_code:
10031004
return None
10041005
raise
10051006

10061007
if raw:
1007-
return data
1008-
return self.store_user(data, try_cache=cache)
1008+
return data[0]
1009+
return self.store_user(data[0], try_cache=cache)
10091010

10101011
async def fetch_users_by_display_name(self, display_name: str, *,
10111012
raw: bool = False

rebootpy/http.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,26 +1193,6 @@ async def account_graphql_get_by_display_name(self,
11931193
}
11941194
))
11951195

1196-
async def account_graphql_get_clients_external_auths(self,
1197-
**kwargs: Any
1198-
) -> dict:
1199-
return await self.graphql_request(GraphQLRequest(
1200-
query="""
1201-
query AccountQuery {
1202-
Account {
1203-
myAccount {
1204-
externalAuths {
1205-
type
1206-
accountId
1207-
externalAuthId
1208-
externalDisplayName
1209-
}
1210-
}
1211-
}
1212-
}
1213-
"""
1214-
), **kwargs)
1215-
12161196
###################################
12171197
# Eula Tracking #
12181198
###################################

0 commit comments

Comments
 (0)