summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_polling.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-06-30 08:29:52 +0000
committerRobert Pösel <robyer@seznam.cz>2016-06-30 08:29:52 +0000
commitff1c157a941458735ece56effc60f3ab7a88b8d8 (patch)
tree51e4d634d3376df8c489863c1dfe2529d2027f4f /protocols/Steam/src/steam_polling.cpp
parent8b5c9ad399a7cdb1c8b4986d4289f7b2a87248c2 (diff)
Steam: Support repeated authorization from same contact
E.g., when he was deleted and drequested authorization again, while Miranda was offline and couldn't catch the deleted event. But it's not tested. git-svn-id: http://svn.miranda-ng.org/main/trunk@17051 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_polling.cpp')
-rw-r--r--protocols/Steam/src/steam_polling.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/protocols/Steam/src/steam_polling.cpp b/protocols/Steam/src/steam_polling.cpp
index a008c359cb..6b53d31763 100644
--- a/protocols/Steam/src/steam_polling.cpp
+++ b/protocols/Steam/src/steam_polling.cpp
@@ -119,19 +119,22 @@ void CSteamProto::ParsePollData(JSONNode *data)
case 2:
{// auth request
- /*MCONTACT hContact = FindContact(steamId);
- if (!hContact)
- hContact = AddContact(steamId, true);*/
-
- //RaiseAuthRequestThread((void*)hContact);
-
- ptrA token(getStringA("TokenSecret"));
-
- PushRequest(
- new GetUserSummariesRequest(token, steamId),
- &CSteamProto::OnAuthRequested,
- mir_strdup(steamId),
- MirFreeArg);
+ MCONTACT hContact = FindContact(steamId);
+ if (hContact)
+ {
+ ContactIsAskingAuth(hContact);
+ }
+ else
+ {
+ // load info about this user from server
+ ptrA token(getStringA("TokenSecret"));
+
+ PushRequest(
+ new GetUserSummariesRequest(token, steamId),
+ &CSteamProto::OnAuthRequested,
+ mir_strdup(steamId),
+ MirFreeArg);
+ }
}
break;