summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-12-04 06:53:32 +0000
committerRobert Pösel <robyer@seznam.cz>2014-12-04 06:53:32 +0000
commit8c59441b579c7f7a23668a059ca1366d6ff864b3 (patch)
tree4fc1218f1567590ed5608430229ae6cf86eda907
parent355f69d42075967db7f51081f9520fed3ea9a801 (diff)
Steam: Fix for downloading own avatar too
git-svn-id: http://svn.miranda-ng.org/main/trunk@11237 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/Steam/src/steam_contacts.cpp15
1 files changed, 9 insertions, 6 deletions
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);
}