From 8c59441b579c7f7a23668a059ca1366d6ff864b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Thu, 4 Dec 2014 06:53:32 +0000 Subject: Steam: Fix for downloading own avatar too git-svn-id: http://svn.miranda-ng.org/main/trunk@11237 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_contacts.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'protocols/Steam/src/steam_contacts.cpp') diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 8116588f0a..505a088038 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -181,7 +181,7 @@ void CSteamProto::OnGotFriendList(const NETLIBHTTPREQUEST *response, void *arg) if (root == NULL) return; - std::string steamIds; + std::string steamIds = ptrA(getStringA("SteamID")); JSONNODE *node = json_get(root, "friends"); JSONNODE *nroot = json_as_array(node); @@ -195,7 +195,7 @@ void CSteamProto::OnGotFriendList(const NETLIBHTTPREQUEST *response, void *arg) node = json_get(child, "steamid"); ptrA steamId(mir_u2a(json_as_string(node))); - steamIds.append(steamId).append(","); + steamIds.append(",").append(steamId); MCONTACT hContact = FindContact(steamId); if (!hContact) @@ -227,7 +227,7 @@ void CSteamProto::OnGotFriendList(const NETLIBHTTPREQUEST *response, void *arg) if (!steamIds.empty()) { - steamIds.pop_back(); + //steamIds.pop_back(); ptrA token(getStringA("TokenSecret")); PushRequest( @@ -301,9 +301,12 @@ void CSteamProto::OnGotUserSummaries(const NETLIBHTTPREQUEST *response, void *ar node = json_get(item, "steamid"); ptrA steamId(mir_u2a(json_as_string(node))); - MCONTACT hContact = FindContact(steamId); - if (!hContact) - hContact = AddContact(steamId); + MCONTACT hContact = NULL; + if (!IsMe(steamId)) { + hContact = FindContact(steamId); + if (!hContact) + hContact = AddContact(steamId); + } UpdateContact(hContact, item); } -- cgit v1.2.3