steamutils 1.4.89 → 1.4.90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/SteamClient.js +8 -3
  2. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -2315,6 +2315,9 @@ function SteamClient({ username, cookie, clientJsToken, isAutoRequestFreeLicense
2315
2315
  try {
2316
2316
  isSendingFriendMessages = true;
2317
2317
  const item = MessageQueue.shift();
2318
+ if (!item) {
2319
+ break;
2320
+ }
2318
2321
  const result = await _sendFriendMessage(item.steamId, item.message);
2319
2322
  if (typeof item.callback === "function") {
2320
2323
  try {
@@ -2324,7 +2327,9 @@ function SteamClient({ username, cookie, clientJsToken, isAutoRequestFreeLicense
2324
2327
  if (MessageQueue.length) {
2325
2328
  await sleep(1000);
2326
2329
  }
2327
- } catch (e) {}
2330
+ } catch (e) {
2331
+ console.error("_execMessageQueue", e);
2332
+ }
2328
2333
  }
2329
2334
  isSendingFriendMessages = false;
2330
2335
  }
@@ -2336,8 +2341,8 @@ function SteamClient({ username, cookie, clientJsToken, isAutoRequestFreeLicense
2336
2341
  return;
2337
2342
  }
2338
2343
  result = await new Promise((resolve) => {
2339
- steamClient.chat.sendFriendMessage(steamId, message, undefined, function (...arg) {
2340
- resolve(arg);
2344
+ steamClient.chat.sendFriendMessage(steamId, message, undefined, function (...args) {
2345
+ resolve(args);
2341
2346
  });
2342
2347
  });
2343
2348
  if (result?.[1]?.server_timestamp) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.4.89",
3
+ "version": "1.4.90",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.6",