xDimGG / node-steamapi

An object-oriented Steam API wrapper for Node.js developers.
https://www.npmjs.com/package/steamapi
177 stars 43 forks source link

steam.resolve() *issue* #21

Closed bg1337 closed 2 years ago

bg1337 commented 4 years ago

Hi,

when trying to resolve any steam profile with a custom id contain (-), the function ignores the (-)

For Example: when resolving "https://steamcommunity.com/id/draft-" resulted ID64 is : "76561198156050531" which belongs to the below steam profile "https://steamcommunity.com/id/draft"

Scui1 commented 4 years ago

Thats true, There is a fix for this but I had no time to make a pull request yet Change this line: const reProfileID = RegExp(String.raw${reProfileBase}(?:id\/)?(\w{2,32}), 'i'); here

To this line: const reProfileID = RegExp(String.raw${reProfileBase}(?:id\/)?([a-zA-Z0-9_-]{2,32}), 'i');

bg1337 commented 4 years ago

didnt work

Scui1 commented 4 years ago

Works fine for me. Just use the pull request i created, or otherwise you need to wait for xDimGG to deliver a fix.

bg1337 commented 4 years ago

this what worked for me:

const reProfileID = RegExp(String.raw${reProfileBase}(?:id\/)?([a-zA-Z0-9_-]{2,32}), 'i');

patkub commented 2 years ago

This is already fixed :+1: