steamutils 1.2.37 → 1.2.38
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +3 -1
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -1104,6 +1104,9 @@ function SteamClient({
|
|
1104
1104
|
})
|
1105
1105
|
|
1106
1106
|
steamClient.chat.on('friendMessage', async (data) => {
|
1107
|
+
if (!data) return
|
1108
|
+
data.message_no_bbcode = data.message_no_bbcode?.replaceAll(`ː`,`:`)
|
1109
|
+
data.message = data.message?.replaceAll(`ː`,`:`)
|
1107
1110
|
const example = {
|
1108
1111
|
"steamid_friend": {
|
1109
1112
|
"universe": 1,
|
@@ -1127,7 +1130,6 @@ function SteamClient({
|
|
1127
1130
|
const steamId = data.steamid_friend.getSteamID64()
|
1128
1131
|
const personas = await getPersonas([steamId])
|
1129
1132
|
const player_name = personas.find(p => p.id == steamId)?.player_name || ''
|
1130
|
-
log('friendMessage', data)
|
1131
1133
|
const invite = [`Invited you to play a game!`, `Đã mời bạn chơi một trò chơi!`].includes(data.message_no_bbcode || data.message)
|
1132
1134
|
|
1133
1135
|
callEvent(events.friendMessage, {
|