summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 3259b53eca..0c059872d3 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -323,7 +323,10 @@ void CVkProto::OnReceiveUserInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
}
szValue = json_as_string( json_get(pRecord, "photo_100"));
- SetAvatarUrl(hContact, szValue);
+ if (szValue && *szValue){
+ SetAvatarUrl(hContact, szValue);
+ ReloadAvatarInfo(hContact);
+ }
int iNewStatus = (json_as_int(json_get(pRecord, "online")) == 0) ? ID_STATUS_OFFLINE : ID_STATUS_ONLINE;
if (getWord(hContact, "Status", 0) != iNewStatus)
@@ -419,7 +422,10 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq
setTString(hContact, "Nick", tszNick);
szValue = json_as_string(json_get(pInfo, "photo_100"));
- SetAvatarUrl(hContact, szValue);
+ if (szValue && *szValue){
+ SetAvatarUrl(hContact, szValue);
+ ReloadAvatarInfo(hContact);
+ }
int iNewStatus = (json_as_int(json_get(pInfo, "online")) == 0) ? ID_STATUS_OFFLINE : ID_STATUS_ONLINE;
if (getWord(hContact, "Status", 0) != iNewStatus)