DoctorMcKay / node-steam-user

Allows interaction with the Steam network via the Steam client protocol
https://dev.doctormckay.com/forum/7-node-steam-user/
MIT License
895 stars 157 forks source link

Friendmessage Event not triggering from Mobile #332

Closed piman51277 closed 4 years ago

piman51277 commented 4 years ago

The friendMessage event does not trigger for messages coming from the mobile Steam App. It functions normally for messages coming from Desktop.

This broke very recently, and might have to do with the recent Steam Friends update.

Versions

steam-user v4.18.0 node v12.18.3

DoctorMcKay commented 4 years ago

Can you please show the code for your event listener?

piman51277 commented 4 years ago
this.client = new SteamUser();
const loginCredentials = {
    accountName: < username > ,
    password: < password > ,
    twoFactorCode: SteamTotp.generateAuthCode( < sharedSecret > ),
    autoRelogin: true,
    machineName: "PiBot"
}
this.client.logOn(loginCredentials);
this.client.on('friendMessage', (steamID, msg) => {
    this.processCommands(steamID, msg) //msg parsing/processing function
})
piman51277 commented 4 years ago

The friendMessage event listener is only added after the loggedOn event. (This code is compiled from snippets from my bot class)

DoctorMcKay commented 4 years ago

Please try using the new Steam chat version. It would be this.client.chat.on('friendMessage', (message) => {})

piman51277 commented 4 years ago

The error persists. It exhibits the same behavior as before.

piman51277 commented 4 years ago

The error has stopped occurring. This might have been a problem with Steam.