steamutils 1.4.25 → 1.4.26

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.
Files changed (2) hide show
  1. package/index.js +7 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -4946,10 +4946,9 @@ export default class SteamUser {
4946
4946
  }
4947
4947
  };
4948
4948
 
4949
- const isVerificationCodeSent = (html) => {
4949
+ const getHelpPageTitle = (html) => {
4950
4950
  const $ = cheerio.load(html);
4951
- const help_page_title = $("#forgot_login_code_form .help_page_title").text().trim();
4952
- return help_page_title.startsWith("A verification code was sent to phone number ending in");
4951
+ return $("#forgot_login_code_form .help_page_title").text().trim();
4953
4952
  };
4954
4953
 
4955
4954
  const { type, link: helpLink } = (await getHelpLink()) || {};
@@ -4985,7 +4984,9 @@ export default class SteamUser {
4985
4984
  };
4986
4985
  }
4987
4986
 
4988
- if (!isVerificationCodeSent(html)) {
4987
+ const help_page_title = getHelpPageTitle(html);
4988
+
4989
+ if (!help_page_title.startsWith("A verification code was sent to phone number ending in")) {
4989
4990
  const sendAccountRecoveryCodeResult = await this._httpRequest({
4990
4991
  url: `https://help.steampowered.com/en/wizard/AjaxSendAccountRecoveryCode`,
4991
4992
  headers: {
@@ -5006,12 +5007,14 @@ export default class SteamUser {
5006
5007
  return {
5007
5008
  success: !!sendAccountRecoveryCodeResult.data?.success,
5008
5009
  params,
5010
+ help_page_title,
5009
5011
  };
5010
5012
  }
5011
5013
 
5012
5014
  return {
5013
5015
  success: true,
5014
5016
  params,
5017
+ help_page_title,
5015
5018
  };
5016
5019
  }
5017
5020
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.4.25",
3
+ "version": "1.4.26",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.6",