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.
- package/SteamClient.js +8 -0
- 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
|
}
|