From 19fe951d965b2a1197ac7df11cd695aa8ea6cb9a Mon Sep 17 00:00:00 2001 From: Alexander Corn Date: Mon, 29 Jun 2015 16:38:24 -0400 Subject: [PATCH] Added ability to spoof UI mode --- components/chat.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/chat.js b/components/chat.js index 892da93..836ac0d 100644 --- a/components/chat.js +++ b/components/chat.js @@ -28,12 +28,13 @@ SteamCommunity.PersonaStateFlag = { "OnlineUsingBigPicture": 1024 }; -SteamCommunity.prototype.chatLogon = function(interval) { +SteamCommunity.prototype.chatLogon = function(interval, uiMode) { if(this.chatState == SteamCommunity.ChatState.LoggingOn || this.chatState == SteamCommunity.ChatState.LoggedOn) { return; } interval = interval || 500; + uiMode = uiMode || "web"; this.emit('debug', 'Requesting chat WebAPI token'); this.chatState = SteamCommunity.ChatState.LoggingOn; @@ -58,7 +59,7 @@ SteamCommunity.prototype.chatLogon = function(interval) { self.request.post({ "uri": "https://api.steampowered.com/ISteamWebUserPresenceOAuth/Logon/v1", "form": { - "ui_mode": "web", + "ui_mode": uiMode, "access_token": match[0] }, "json": true