DoctorMcKay / node-steamcommunity

Interact with various interfaces on Steam Community from Node.js
https://dev.doctormckay.com/forum/8-node-steamcommunity/
MIT License
475 stars 128 forks source link

Fix resolving vanity for private profiles returning error #315

Open 3urobeat opened 1 year ago

3urobeat commented 1 year ago

This PR fixes #313 (again)
Steam does not provide a customURL key in the XML data for private profiles which is something I did not expect when working on the previous PR.

To keep support for providing /profiles/steamID64 links I have added an if check that only parses the URL param as a fallback option.
If a /profiles/steamID64 link was provided to a private profile there is nothing we can do so I am returning an empty string.

I hope there is no other oversight hidden in this function now

3urobeat commented 6 months ago

Hey, sorry for bumping, but it would be cool if you could review this PR as it fixes bugs present in the master branch.
(There are also two more of my PRs still open, but they add new features and merge into v4 instead)