steamutils 1.2.32 → 1.2.34
Sign up to get free protection for your applications and to get access to all the features.
- package/.idea/deployment.xml +21 -0
- package/.idea/steamutils.iml +1 -1
- package/.idea/vcs.xml +1 -1
- package/SteamClient.js +7 -0
- package/index.js +10 -7
- package/package.json +1 -1
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
4
|
+
<serverData>
|
5
|
+
<paths name="steamsupport">
|
6
|
+
<serverdata>
|
7
|
+
<mappings>
|
8
|
+
<mapping local="$PROJECT_DIR$" web="/" />
|
9
|
+
</mappings>
|
10
|
+
</serverdata>
|
11
|
+
</paths>
|
12
|
+
<paths name="steamsupportui">
|
13
|
+
<serverdata>
|
14
|
+
<mappings>
|
15
|
+
<mapping local="$PROJECT_DIR$" web="/" />
|
16
|
+
</mappings>
|
17
|
+
</serverdata>
|
18
|
+
</paths>
|
19
|
+
</serverData>
|
20
|
+
</component>
|
21
|
+
</project>
|
package/.idea/steamutils.iml
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
<module type="WEB_MODULE" version="4">
|
3
3
|
<component name="NewModuleRootManager">
|
4
4
|
<content url="file://$MODULE_DIR$">
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
6
5
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
7
7
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
8
8
|
</content>
|
9
9
|
<orderEntry type="inheritedJdk" />
|
package/.idea/vcs.xml
CHANGED
package/SteamClient.js
CHANGED
@@ -1610,6 +1610,7 @@ function SteamClient({
|
|
1610
1610
|
return playingBlocked
|
1611
1611
|
},
|
1612
1612
|
async getChatHistory(steamId) {
|
1613
|
+
if (!steamClient.steamID) return []
|
1613
1614
|
const mySteamId = typeof steamClient.steamID.getSteamID64 === "function" ? steamClient.steamID.getSteamID64() : steamClient.steamID
|
1614
1615
|
return new Promise(resolve => {
|
1615
1616
|
setTimeout(resolve, 90000)
|
@@ -1638,6 +1639,12 @@ function SteamClient({
|
|
1638
1639
|
community.redeemGift(gid)
|
1639
1640
|
} catch (e) {
|
1640
1641
|
}
|
1642
|
+
},
|
1643
|
+
async requestFreeLicense(...args){
|
1644
|
+
try {
|
1645
|
+
return await steamClient.requestFreeLicense(...args)
|
1646
|
+
} catch (e) {
|
1647
|
+
}
|
1641
1648
|
}
|
1642
1649
|
}
|
1643
1650
|
}
|
package/index.js
CHANGED
@@ -5885,14 +5885,17 @@ class SteamUser {
|
|
5885
5885
|
}
|
5886
5886
|
|
5887
5887
|
static parseTradeURL(tradeURL){
|
5888
|
-
|
5889
|
-
|
5890
|
-
|
5888
|
+
try {
|
5889
|
+
const tradeURLParams = url.parse(tradeURL).query.split('&').reduce((accumulator, currentValue, index) => ({
|
5890
|
+
...accumulator, [currentValue.split('=')[0]]: currentValue.split('=')[1]
|
5891
|
+
}), {})
|
5891
5892
|
|
5892
|
-
|
5893
|
-
|
5894
|
-
|
5895
|
-
|
5893
|
+
return {
|
5894
|
+
accountId: tradeURLParams.partner,
|
5895
|
+
steamId: SteamID.fromIndividualAccountID(tradeURLParams.partner).getSteamID64(),
|
5896
|
+
token: tradeURLParams.token,
|
5897
|
+
}
|
5898
|
+
} catch (e) {
|
5896
5899
|
}
|
5897
5900
|
}
|
5898
5901
|
|
package/package.json
CHANGED