From 48d96159fed783f7dfa7520ee7433cda8816369e Mon Sep 17 00:00:00 2001 From: Alex Corn Date: Mon, 2 Sep 2024 21:12:56 -0400 Subject: [PATCH] Pass machine_name to steam-session Fixes #486 --- components/03-messages.js | 11 +++++++++-- package.json | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/03-messages.js b/components/03-messages.js index c1ca2892..0126e64a 100644 --- a/components/03-messages.js +++ b/components/03-messages.js @@ -735,10 +735,17 @@ class SteamUserMessages extends SteamUserConnection { _getLoginSession() { if (!this._loginSession) { - this._loginSession = new LoginSession(EAuthTokenPlatformType.SteamClient, { + let options = { transport: new CMAuthTransport(this), machineId: this._logOnDetails?.machine_id - }); + }; + + let customMachineName = this._logOnDetails?.machine_name || ''; + if (customMachineName.length > 0) { + options.machineFriendlyName = customMachineName; + } + + this._loginSession = new LoginSession(EAuthTokenPlatformType.SteamClient, options); } return this._loginSession; diff --git a/package.json b/package.json index 4f3d0e6f..23a6bb9c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "protobufjs": "^7.2.4", "socks-proxy-agent": "^7.0.0", "steam-appticket": "^1.0.1", - "steam-session": "^1.7.0", + "steam-session": "^1.8.0", "steam-totp": "^2.0.1", "steamid": "^2.0.0", "websocket13": "^4.0.0"