steamutils 1.1.95 → 1.1.97
Sign up to get free protection for your applications and to get access to all the features.
- package/.idea/steamutils.iml +1 -1
- package/.idea/vcs.xml +1 -1
- package/index.js +25 -3
- package/package.json +1 -1
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
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/index.js
CHANGED
@@ -2699,8 +2699,15 @@ class SteamUser {
|
|
2699
2699
|
}
|
2700
2700
|
|
2701
2701
|
//{ invited: [ '76561199277912057' ], success: 1 }
|
2702
|
-
|
2703
|
-
|
2702
|
+
/*
|
2703
|
+
* {
|
2704
|
+
failed_invites: [ '76561199227727116' ],
|
2705
|
+
failed_invites_result: [ 84 ],
|
2706
|
+
success: 1
|
2707
|
+
}
|
2708
|
+
* */
|
2709
|
+
async addFriendUser(steamID) {
|
2710
|
+
const {data} = await this._httpRequestAjax({
|
2704
2711
|
url: `actions/AddFriendAjax`,
|
2705
2712
|
data: {
|
2706
2713
|
steamid: steamID,
|
@@ -2712,6 +2719,21 @@ class SteamUser {
|
|
2712
2719
|
method: 'POST',
|
2713
2720
|
})
|
2714
2721
|
|
2722
|
+
if (data) {
|
2723
|
+
const failed_invites_result_message_mapping = {
|
2724
|
+
25: 'Could not invite %s. Your friends list is full.',
|
2725
|
+
15: 'Could not invite %s. Their friends list is full.',
|
2726
|
+
40: 'Error adding Friend. Communication between you and this user has been blocked.',
|
2727
|
+
11: 'You are blocking all communication with this user. Before communicating with this user, you must unblock them by visiting their Steam Community Profile.',
|
2728
|
+
84: `It looks like you've sent too many friend invites. To prevent spam, you'll have to wait before you can invite more friends. Please note that other players can still add you during this time.`,
|
2729
|
+
24: `Your account does not meet the requirements to use this feature. Visit Steam Support for more information.`,
|
2730
|
+
}
|
2731
|
+
const failed_invites_result = data?.failed_invites_result?.[0]
|
2732
|
+
if (failed_invites_result && failed_invites_result_message_mapping[failed_invites_result]) {
|
2733
|
+
data.failed_invites_result_message = failed_invites_result_message_mapping[failed_invites_result]
|
2734
|
+
}
|
2735
|
+
}
|
2736
|
+
|
2715
2737
|
return data
|
2716
2738
|
}
|
2717
2739
|
|
@@ -3641,7 +3663,7 @@ class SteamUser {
|
|
3641
3663
|
}
|
3642
3664
|
}
|
3643
3665
|
|
3644
|
-
if(
|
3666
|
+
if(typeof result._$ !== "function") return
|
3645
3667
|
const parseResult = _self._parseSteamWebAPIKey(result._$())
|
3646
3668
|
if (parseResult.error === 'registerkey') {
|
3647
3669
|
const result2 = await this._httpRequest({
|
package/package.json
CHANGED