diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-17 03:50:25 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-17 03:50:25 +0000 |
commit | cdb643a8d54843c523433b79e8eb6ca5a4ce0d5c (patch) | |
tree | 5eb8e2edec95b7330fa9240c2833d794cec5fdfd /protocols/VKontakte/src/vk_thread.cpp | |
parent | 8fac280dcdf11c02948e0af8cd2f3b5badef88fa (diff) |
VKontakte: sel-contact userinfo loading
git-svn-id: http://svn.miranda-ng.org/main/trunk@10810 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index d6bcf02c31..1babac70be 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -239,9 +239,9 @@ void CVkProto::OnReceiveMyInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) static char fieldsName[] = "id, first_name, last_name, photo_100, bdate, sex, timezone, contacts, online, status, about, domain";
-MCONTACT CVkProto::SetContactInfo(JSONNODE* pItem, bool flag)
+MCONTACT CVkProto::SetContactInfo(JSONNODE* pItem, bool flag, bool self)
{
- debugLogA("CVkProto::SetContactInfo");
+ debugLogA("CVkProto::SetContactInfo flag=%d self = %d", flag, self);
if (pItem == NULL)
return -1;
@@ -249,10 +249,16 @@ MCONTACT CVkProto::SetContactInfo(JSONNODE* pItem, bool flag) if (userid == 0)
return -1;
- MCONTACT hContact;
- if (userid == m_myUserId)
- hContact = NULL;
- else if ((hContact = FindUser(userid, flag)) == NULL)
+ MCONTACT hContact = FindUser(userid, flag);
+
+ if (userid == m_myUserId){
+ if (hContact != NULL)
+ if (self)
+ hContact = NULL;
+ else
+ SetContactInfo(pItem, flag, true);
+ }
+ else if (hContact == NULL)
return -1;
CMString tszNick, tszValue;
|