mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-02-06 10:04:37 +08:00
Added ability to spoof UI mode
This commit is contained in:
parent
a348112ccb
commit
19fe951d96
@ -28,12 +28,13 @@ SteamCommunity.PersonaStateFlag = {
|
|||||||
"OnlineUsingBigPicture": 1024
|
"OnlineUsingBigPicture": 1024
|
||||||
};
|
};
|
||||||
|
|
||||||
SteamCommunity.prototype.chatLogon = function(interval) {
|
SteamCommunity.prototype.chatLogon = function(interval, uiMode) {
|
||||||
if(this.chatState == SteamCommunity.ChatState.LoggingOn || this.chatState == SteamCommunity.ChatState.LoggedOn) {
|
if(this.chatState == SteamCommunity.ChatState.LoggingOn || this.chatState == SteamCommunity.ChatState.LoggedOn) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
interval = interval || 500;
|
interval = interval || 500;
|
||||||
|
uiMode = uiMode || "web";
|
||||||
|
|
||||||
this.emit('debug', 'Requesting chat WebAPI token');
|
this.emit('debug', 'Requesting chat WebAPI token');
|
||||||
this.chatState = SteamCommunity.ChatState.LoggingOn;
|
this.chatState = SteamCommunity.ChatState.LoggingOn;
|
||||||
@ -58,7 +59,7 @@ SteamCommunity.prototype.chatLogon = function(interval) {
|
|||||||
self.request.post({
|
self.request.post({
|
||||||
"uri": "https://api.steampowered.com/ISteamWebUserPresenceOAuth/Logon/v1",
|
"uri": "https://api.steampowered.com/ISteamWebUserPresenceOAuth/Logon/v1",
|
||||||
"form": {
|
"form": {
|
||||||
"ui_mode": "web",
|
"ui_mode": uiMode,
|
||||||
"access_token": match[0]
|
"access_token": match[0]
|
||||||
},
|
},
|
||||||
"json": true
|
"json": true
|
||||||
|
Loading…
Reference in New Issue
Block a user