From 7310f494c143feac54a6f2ea3b7e2a2bb5eeac4f Mon Sep 17 00:00:00 2001
From: George Hazan <ghazan@miranda.im>
Date: Mon, 16 Dec 2019 15:33:42 +0300
Subject: fixes #2122 (ICQ-WIM: removed ICQ contact appears again in the
 contact list)

---
 protocols/ICQ-WIM/src/poll.cpp  | 9 +++------
 protocols/ICQ-WIM/src/stdafx.h  | 2 --
 protocols/ICQ-WIM/src/version.h | 2 +-
 3 files changed, 4 insertions(+), 9 deletions(-)

(limited to 'protocols/ICQ-WIM')

diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp
index f0d1291427..edeb329bcc 100644
--- a/protocols/ICQ-WIM/src/poll.cpp
+++ b/protocols/ICQ-WIM/src/poll.cpp
@@ -79,8 +79,6 @@ void CIcqProto::ProcessBuddyList(const JSONNode &ev)
 
 void CIcqProto::ProcessDiff(const JSONNode &ev)
 {
-	std::map<MCONTACT, bool> processed;
-
 	for (auto &block : ev) {
 		CMStringW szType = block["type"].as_mstring();
 		if (szType != "updated" && szType != "created" && szType != "deleted")
@@ -108,14 +106,13 @@ void CIcqProto::ProcessDiff(const JSONNode &ev)
 			bool bCreated = false, bDeleted = (szType == "deleted");
 
 			for (auto &buddy : it["buddies"]) {
-				MCONTACT hContact = ParseBuddyInfo(buddy);
-				if (hContact == INVALID_CONTACT_ID)
+				if (bDeleted)
 					continue;
 
-				if (bDeleted)
+				MCONTACT hContact = ParseBuddyInfo(buddy);
+				if (hContact == INVALID_CONTACT_ID)
 					continue;
 
-				processed[hContact] = true;
 				setWString(hContact, "IcqGroup", pGroup->wszName);
 
 				ptrW wszGroup(Clist_GetGroup(hContact));
diff --git a/protocols/ICQ-WIM/src/stdafx.h b/protocols/ICQ-WIM/src/stdafx.h
index 22d32fa2db..385504c07a 100644
--- a/protocols/ICQ-WIM/src/stdafx.h
+++ b/protocols/ICQ-WIM/src/stdafx.h
@@ -41,8 +41,6 @@
 #include <fcntl.h>
 #include <process.h>
 
-#include <map>
-
 // Miranda IM SDK includes
 #include <newpluginapi.h> // This must be included first
 #include <m_avatars.h>
diff --git a/protocols/ICQ-WIM/src/version.h b/protocols/ICQ-WIM/src/version.h
index 9e813e32ec..d6aa5c9c99 100644
--- a/protocols/ICQ-WIM/src/version.h
+++ b/protocols/ICQ-WIM/src/version.h
@@ -1,7 +1,7 @@
 #define __MAJOR_VERSION          0
 #define __MINOR_VERSION          95
 #define __RELEASE_NUM            11
-#define __BUILD_NUM              6
+#define __BUILD_NUM              7
 
 #include <stdver.h>
 
-- 
cgit v1.2.3