steamutils 1.2.64 → 1.2.65

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 +12 -18
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5551,27 +5551,24 @@ class SteamUser {
5551
5551
  "Subscription/Seasonal Item Grant"
5552
5552
  ];
5553
5553
 
5554
+ const peopleEl = tradehistory_event_description_el.find('a[href]')
5555
+ const profileURL = peopleEl.attr('href');
5556
+ if (profileURL.startsWith("https://steamcommunity.com/profiles/") || profileURL.startsWith("https://steamcommunity.com/id/")) {
5557
+ tradePeople = {
5558
+ name: peopleEl.text().trim(),
5559
+ url: profileURL
5560
+ }
5561
+ }
5562
+
5554
5563
  if (!descriptions.includes(description)) {
5555
5564
  if (description.startsWith("You traded with ")) {
5556
5565
  const peopleEl = tradehistory_event_description_el.find('a[href]')
5557
- tradePeople = {
5558
- name: peopleEl.text().trim(),
5559
- url: peopleEl.attr('href')
5560
- }
5561
5566
  description = "You traded with"
5562
5567
  } else if (description.startsWith("Gift sent to and redeemed by ")) {
5563
5568
  const peopleEl = tradehistory_event_description_el.find('a[href]')
5564
- tradePeople = {
5565
- name: peopleEl.text().trim(),
5566
- url: peopleEl.attr('href')
5567
- }
5568
5569
  description = "Gift sent to and redeemed by"
5569
5570
  } else if (description.startsWith("Your trade with ") && description.endsWith(" was on hold, and the trade has now completed.")) {
5570
5571
  const peopleEl = tradehistory_event_description_el.find('a[href]')
5571
- tradePeople = {
5572
- name: peopleEl.text().trim(),
5573
- url: peopleEl.attr('href')
5574
- }
5575
5572
  description = "Your trade with friend was on hold, and the trade has now completed."
5576
5573
  } else if (description.startsWith("You listed an item on the Community Market. The listing was placed on hold until")) {
5577
5574
  //You listed an item on the Community Market. The listing was placed on hold until 24 Jan @ 3:06am.
@@ -5579,16 +5576,13 @@ class SteamUser {
5579
5576
  } else if (description.startsWith("Earned in ")) {
5580
5577
  //Earned in PUBG: BATTLEGROUNDS
5581
5578
  description = "Earned in game"
5582
- } else if (description.startsWith("Refunded a gift because the recipient,") && description.startsWith("declined")) {
5579
+ } else if (description.startsWith("Refunded a gift because the recipient,") && description.endsWith("declined")) {
5583
5580
  //Refunded a gift because the recipient, Ava, declined
5581
+ const peopleEl = tradehistory_event_description_el.find('a[href]')
5584
5582
  description = "Refunded a gift because the recipient declined"
5585
- } else if (description.startsWith("Your held trade with") && description.startsWith("was canceled. The items have been returned to you.")) {
5583
+ } else if (description.startsWith("Your held trade with") && description.endsWith("was canceled. The items have been returned to you.")) {
5586
5584
  //Your held trade with TrQuBach96 was canceled. The items have been returned to you.
5587
5585
  const peopleEl = tradehistory_event_description_el.find('a[href]')
5588
- tradePeople = {
5589
- name: peopleEl.text().trim(),
5590
- url: peopleEl.attr('href')
5591
- }
5592
5586
  description = "Your held trade with person was canceled. The items have been returned to you."
5593
5587
  } else {
5594
5588
  console.log("== Description ==");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.64",
3
+ "version": "1.2.65",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",