steamutils 1.0.9 → 1.0.11
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 +11 -6
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -112,8 +112,12 @@ function SteamClient({
|
|
112
112
|
}
|
113
113
|
}
|
114
114
|
if (!personas) {
|
115
|
-
|
116
|
-
|
115
|
+
try {
|
116
|
+
personas = (await steamClient.getPersonas(steamIDs))?.personas
|
117
|
+
} catch (e) {
|
118
|
+
}
|
119
|
+
}
|
120
|
+
if (personas) {
|
117
121
|
for (let sid64 in personas) {
|
118
122
|
personas[sid64].id = sid64
|
119
123
|
personas[sid64].avatar_hash = Buffer.from(personas[sid64].avatar_hash).toString("hex")
|
@@ -228,11 +232,12 @@ function SteamClient({
|
|
228
232
|
break
|
229
233
|
}
|
230
234
|
case Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_Party_Invite: {
|
231
|
-
|
232
|
-
|
235
|
+
const msg = protoDecode(Protos.csgo.CMsgGCCStrike15_v2_Party_Invite, payload);
|
236
|
+
const sid = SteamID.fromIndividualAccountID(msg.accountid);
|
233
237
|
// console.log(msg)
|
234
|
-
|
235
|
-
|
238
|
+
const personas = await getPersonas([sid]);
|
239
|
+
const sID64 = sid.getSteamID64();
|
240
|
+
console.log(personas.find(p => p.id == sID64)?.player_name, `https://steamcommunity.com/profiles/${sID64}`);
|
236
241
|
// joinLobby(msg.lobbyid, msg.accountid)
|
237
242
|
break
|
238
243
|
}
|