summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_thread.cpp
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2021-11-26 15:20:20 +0500
committerElzorFox <elzorfox@ya.ru>2021-11-26 15:20:20 +0500
commit4f961df4a3bb6577a0024e341adb9fed6d965edf (patch)
tree617575264994939f48598ec8917e6be67bd4b208 /protocols/VKontakte/src/vk_thread.cpp
parent65435a4f91eeea4af672f83d9bea59f9f86fd03d (diff)
VKontakte: crutch for fix false account deletion
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 804f3f1803..34d412b33c 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -456,6 +456,14 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, VKContactTy
wszValue = jnItem["deactivated"].as_mstring();
CMStringW wszOldDeactivated(ptrW(db_get_wsa(hContact, m_szModuleName, "Deactivated")));
+
+ if (wszValue == L"deleted" && wszOldDeactivated != L"?deleted")
+ wszValue = L"?deleted";
+ else if (wszValue.IsEmpty() && wszOldDeactivated == L"?deleted") {
+ db_unset(hContact, m_szModuleName, "Deactivated");
+ wszOldDeactivated.Empty();
+ }
+
if (wszValue != wszOldDeactivated) {
AddVkDeactivateEvent(hContact, wszValue);
if (wszValue.IsEmpty())