steamutils 1.0.63 → 1.0.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.
- package/SteamClient.js +3 -2
- package/index.js +1 -0
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -10,6 +10,7 @@ import {fileURLToPath} from "url";
|
|
10
10
|
import path from "path";
|
11
11
|
import SteamUtils from "./index.js";
|
12
12
|
import {v4 as uuidv4} from 'uuid';
|
13
|
+
import { steamID } from 'steam-user/components/helpers.js'
|
13
14
|
|
14
15
|
const __filename = fileURLToPath(import.meta.url);
|
15
16
|
const __dirname = path.dirname(__filename);
|
@@ -784,8 +785,8 @@ function SteamClient({
|
|
784
785
|
}
|
785
786
|
const timestamp = new Date(data.server_timestamp).getTime()
|
786
787
|
const steamId = data.steamid_friend.getSteamID64()
|
787
|
-
const personas = await getPersonas([
|
788
|
-
const player_name = personas
|
788
|
+
const personas = await getPersonas([steamId])
|
789
|
+
const player_name = personas.find(p => p.id == steamID)?.player_name || ''
|
789
790
|
log('friendMessage', data)
|
790
791
|
const invite = [`Inited you to play a game!`, `Đã mời bạn chơi một trò chơi!`].includes(data.message_no_bbcode || data.message)
|
791
792
|
|
package/index.js
CHANGED
@@ -1813,6 +1813,7 @@ class SteamUser {
|
|
1813
1813
|
if(!data) {
|
1814
1814
|
return []
|
1815
1815
|
}
|
1816
|
+
console.log(`data`, data)
|
1816
1817
|
return data.friendslist.friends.filter(function (friend) {
|
1817
1818
|
return EFriendRelationship.Friend === friend.efriendrelationship
|
1818
1819
|
}).map(function (friend) {
|