From 313753bb05cbe356f74635d979f2854e975d574a Mon Sep 17 00:00:00 2001 From: Vankxr Date: Fri, 30 Dec 2016 21:24:53 +0000 Subject: [PATCH] Check if requested inventory is ours. Should fix https://github.com/DoctorMcKay/node-steamcommunity/issues/149 --- components/users.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/users.js b/components/users.js index 99fb7ac..4bcf99b 100644 --- a/components/users.js +++ b/components/users.js @@ -368,6 +368,11 @@ SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, cont if (err) { if (err.message == "HTTP error 403" && body === null) { // 403 with a body of "null" means the inventory/profile is private. + if(userID.getSteamID64() == self.steamID.getSteamID64()) { + // We can never get private profile error for our own inventory! + self._notifySessionExpired(err); + } + callback(new Error("This profile is private.")); return; }