summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/VKontakte/src/misc.cpp3
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp9
2 files changed, 7 insertions, 5 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 31124b26b3..eba3462555 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -32,6 +32,9 @@ void CVkProto::SetAllContactStatuses(int iStatus)
SetChatStatus(hContact, iStatus);
else if (getWord(hContact, "Status", 0) != iStatus)
setWord(hContact, "Status", iStatus);
+
+ if (iStatus == ID_STATUS_OFFLINE)
+ SetMirVer(hContact, -1);
}
}
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 39dc6b304a..f4e5866713 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -314,7 +314,7 @@ MCONTACT CVkProto::SetContactInfo(JSONNODE* pItem, bool flag, bool self)
}
int iNewStatus = (json_as_int(json_get(pItem, "online")) == 0) ? ID_STATUS_OFFLINE : ID_STATUS_ONLINE;
- if (getWord(hContact, "Status", 0) != iNewStatus)
+ if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != iNewStatus)
setWord(hContact, "Status", iNewStatus);
if (iNewStatus == ID_STATUS_ONLINE) {
@@ -456,10 +456,9 @@ void CVkProto::OnReceiveUserInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
LONG userID = getDword(hContact, "ID", -1);
if (userID == m_myUserId || userID == VK_FEED_USER)
continue;
- if (getWord(hContact, "Status", 0) != ID_STATUS_OFFLINE) {
- setWord(hContact, "Status", ID_STATUS_OFFLINE);
- SetMirVer(hContact, -1);
- }
+ if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
+ setWord(hContact, "Status", ID_STATUS_OFFLINE);
+ SetMirVer(hContact, -1);
}
arContacts.destroy();
AddFeedSpecialUser();