summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index e33a881a71..684d03d38e 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -292,7 +292,7 @@ void CVkProto::RetrieveFriends()
debugLogA("CVkProto::RetrieveFriends");
HttpParam params[] = {
- { "fields", "uid,first_name,last_name,photo_medium,contacts" },
+ { "fields", "uid,first_name,last_name,photo_medium,sex,country,timezone,contacts" },
{ "count", "1000" },
{ "access_token", m_szAccessToken }
};
@@ -338,6 +338,13 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq
setWord(hContact, "Status", (json_as_int( json_get(pInfo, "online")) == 0) ? ID_STATUS_OFFLINE : ID_STATUS_ONLINE);
+ int iValue = json_as_int( json_get(pInfo, "sex"));
+ if (iValue)
+ setByte(hContact, "Gender", (iValue == 2) ? 'M' : 'F');
+
+ if ((iValue = json_as_int( json_get(pInfo, "timezone"))) != 0)
+ setByte(hContact, "Timezone", iValue * -2);
+
szValue = json_as_string( json_get(pInfo, "mobile_phone"));
if (szValue && *szValue) setTString(hContact, "Cellular", szValue);
szValue = json_as_string( json_get(pInfo, "home_phone"));