From b9cdc72673360f1d9665cc26fb08b85fd7d1e79f Mon Sep 17 00:00:00 2001
From: ElzorFox <elzorfox@ya.ru>
Date: Thu, 3 Nov 2016 10:14:34 +0500
Subject: VKontakte: fix cleaning VK_USER_DEACTIVATE_ACTION on history sync
 (for N days methods)

---
 protocols/VKontakte/src/vk_history.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'protocols')

diff --git a/protocols/VKontakte/src/vk_history.cpp b/protocols/VKontakte/src/vk_history.cpp
index 60413357ab..e0872ae243 100644
--- a/protocols/VKontakte/src/vk_history.cpp
+++ b/protocols/VKontakte/src/vk_history.cpp
@@ -96,7 +96,7 @@ void CVkProto::GetServerHistoryLastNDay(MCONTACT hContact, int NDay)
 		MEVENT hDBEventNext = db_event_next(hContact, hDBEvent);
 		DBEVENTINFO dbei = { sizeof(dbei) };
 		db_event_get(hDBEvent, &dbei);
-		if (dbei.timestamp > tTime)
+		if (dbei.timestamp > tTime && dbei.eventType != VK_USER_DEACTIVATE_ACTION)
 			db_event_delete(hContact, hDBEvent);
 		hDBEvent = hDBEventNext;
 	}
-- 
cgit v1.2.3