steamutils 1.2.92 → 1.2.93

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/SteamClient.js +8 -0
  2. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -1813,6 +1813,14 @@ function SteamClient({
1813
1813
  }]
1814
1814
  },
1815
1815
  uploadRichPresence(appid, richPresence) {
1816
+ if (Array.isArray(richPresence)) {
1817
+ richPresence = richPresence.reduce(function (previousValue, currentValue, currentIndex, array) {
1818
+ if (currentValue.key) {
1819
+ previousValue[currentValue.key] = currentValue.value?.toString() || ''
1820
+ }
1821
+ return previousValue
1822
+ })
1823
+ }
1816
1824
  steamClient.uploadRichPresence(appid, richPresence)
1817
1825
  }
1818
1826
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.92",
3
+ "version": "1.2.93",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",