steamutils 1.0.58 → 1.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SteamClient.js CHANGED
@@ -642,7 +642,7 @@ function SteamClient({
642
642
 
643
643
 
644
644
  steamClient.on('user', async (steamId, data) => {
645
- callEvent(events.user, data)
645
+ callEvent(events.user, { steamId: steamId.getSteamID64(), data })
646
646
  const dataExample = {
647
647
  "rich_presence": [
648
648
  {
package/index.js CHANGED
@@ -3844,6 +3844,10 @@ class SteamUser {
3844
3844
 
3845
3845
  steamIDs = _.uniq(steamIDs)
3846
3846
 
3847
+ if (steamIDs.length > 200) {
3848
+ return _.flatten(await Promise.all(_.chunk(steamIDs, 200).map(_steamIDs => SteamUser.resolveUsers(_steamIDs, cookie))))
3849
+ }
3850
+
3847
3851
  const { data } = await request({
3848
3852
  url: `https://steamcommunity.com/actions/ajaxresolveusers?steamids=${steamIDs.join(',')}`,
3849
3853
  headers: { ...cookie && { cookie } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "dependencies": {
5
5
  "axios": "^1.3.4",
6
6
  "cheerio": "^1.0.0-rc.12",