steamutils 1.3.44 → 1.3.45
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +12 -2
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -2279,8 +2279,18 @@ export function increaseCSGO_VER() {
|
|
2279
2279
|
return ++CSGO_VER
|
2280
2280
|
}
|
2281
2281
|
|
2282
|
-
SteamClient.isAccountPlayable = function isAccountPlayable(params, timeoutMs) {
|
2283
|
-
|
2282
|
+
SteamClient.isAccountPlayable = async function isAccountPlayable(params, timeoutMs) {
|
2283
|
+
let clientJsToken = params.clientJsToken
|
2284
|
+
delete params.clientJsToken
|
2285
|
+
if(!clientJsToken && params.cookie){
|
2286
|
+
clientJsToken = await new SteamUser(typeof params.cookie === "function" ? await params.cookie() : params.cookie).getClientJsToken()
|
2287
|
+
}
|
2288
|
+
if (clientJsToken?.logged_in !== true) {
|
2289
|
+
return false
|
2290
|
+
}
|
2291
|
+
params.clientJsToken = clientJsToken
|
2292
|
+
|
2293
|
+
return await new Promise((resolve) => {
|
2284
2294
|
const timeout = setTimeout(() => {
|
2285
2295
|
doResolve();
|
2286
2296
|
}, timeoutMs || 30000);
|