steamutils 1.0.32 → 1.0.34

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
@@ -792,6 +792,12 @@ function SteamClient({
792
792
  playCSGO,
793
793
  setInterval(cb, timeout){
794
794
  intervals.push(setInterval(cb, timeout))
795
+ },
796
+ async gamesPlayed(apps){
797
+ steamClient.gamesPlayed(apps);
798
+ await sleep(2000)
799
+ steamClient.setPersona(SteamUser.EPersonaState.LookingToPlay)
800
+ sendHello()
795
801
  }
796
802
  }
797
803
  }
package/index.js CHANGED
@@ -1113,6 +1113,13 @@ class SteamUser {
1113
1113
  await sleep(60000)
1114
1114
  result = await request(config)
1115
1115
  }
1116
+ else if (result.status === 401) {
1117
+ console.log('Unauthorized')
1118
+ if (params.method.toUpperCase() === 'POST') {
1119
+ config.headers['Content-Type'] = 'multipart/form-data';
1120
+ result = await request(config)
1121
+ }
1122
+ }
1116
1123
  if(result?.error?.code === 'ERR_FR_TOO_MANY_REDIRECTS') {
1117
1124
  //Maximum number of redirects exceeded
1118
1125
  plsLoginFirst = true
@@ -2332,6 +2339,9 @@ class SteamUser {
2332
2339
  const {data} = await this._httpRequestAjax({
2333
2340
  url: `${this.getMySteamUserProfileURL()}/ajaxclearaliashistory/`,
2334
2341
  method: 'POST',
2342
+ headers: {
2343
+ 'Content-Type':'multipart/form-data'
2344
+ }
2335
2345
  })
2336
2346
  return data
2337
2347
  }
@@ -2572,6 +2582,9 @@ class SteamUser {
2572
2582
  data: {
2573
2583
  Privacy: JSON.stringify(privacyValue.PrivacySettings),
2574
2584
  eCommentPermission: privacyValue.eCommentPermission
2585
+ },
2586
+ headers: {
2587
+ 'Content-Type':'multipart/form-data'
2575
2588
  }
2576
2589
  })
2577
2590
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "dependencies": {
5
5
  "axios": "^1.3.4",
6
6
  "cheerio": "^1.0.0-rc.12",