summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-02-19 06:59:42 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-02-19 06:59:42 +0000
commitffeccf671b31c2f51c06959078c97a689b4144ad (patch)
treeea4841d91c3744c938c64618b32298e75816d7e5 /protocols/VKontakte
parent07f500e694f0a7d813757212c24024bbbf8c0170 (diff)
VKontakte: fix for clear MirVer on protocol offline
git-svn-id: http://svn.miranda-ng.org/main/trunk@12193 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/misc.cpp4
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp5
2 files changed, 7 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 7cb2638cf4..437bdfe664 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -232,8 +232,10 @@ void CVkProto::SetAllContactStatuses(int iStatus)
else if (getWord(hContact, "Status", 0) != iStatus)
setWord(hContact, "Status", iStatus);
- if (iStatus == ID_STATUS_OFFLINE)
+ if (iStatus == ID_STATUS_OFFLINE) {
SetMirVer(hContact, -1);
+ db_unset(hContact, m_szModuleName, "ListeningTo");
+ }
}
}
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index e5f358da48..01ebdf5e01 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -478,9 +478,10 @@ void CVkProto::OnReceiveUserInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
|| (iContactStatus == ID_STATUS_INVISIBLE && time(NULL) - getDword(hContact, "InvisibleTS", 0) >= m_iInvisibleInterval * 60)) {
setWord(hContact, "Status", ID_STATUS_OFFLINE);
SetMirVer(hContact, -1);
+ db_unset(hContact, m_szModuleName, "ListeningTo");
}
- db_unset(hContact, m_szModuleName, "ListeningTo");
}
+
arContacts.destroy();
AddFeedSpecialUser();
@@ -896,6 +897,8 @@ void CVkProto::PollUpdates(JSONNODE *pUpdates)
uid = -json_as_int(json_at(pChild, 1));
if ((hContact = FindUser(uid)) != NULL)
setWord(hContact, "Status", ID_STATUS_OFFLINE);
+ db_unset(hContact, m_szModuleName, "ListeningTo");
+ SetMirVer(hContact, -1);
break;
case VKPOLL_USR_UTN: