summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-04-30 17:52:29 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-04-30 17:52:29 +0300
commit9f00802dfbad293235fc44536069c64b236fdc50 (patch)
treed6d337bdc9334c5516e30f83d5edf9f742be2f35 /protocols/ICQ-WIM/src/proto.cpp
parent84f2722e07a23656bdc8d1a7f4040e86450fe91d (diff)
fixes #2859 (Импорт: дублируются контакты ICQ и FaceBook)
Diffstat (limited to 'protocols/ICQ-WIM/src/proto.cpp')
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp
index 87a33e0502..d7bf399154 100644
--- a/protocols/ICQ-WIM/src/proto.cpp
+++ b/protocols/ICQ-WIM/src/proto.cpp
@@ -142,6 +142,15 @@ void CIcqProto::OnShutdown()
m_bTerminated = true;
}
+void CIcqProto::OnContactAdded(MCONTACT hContact)
+{
+ CMStringW wszId(getMStringW(hContact, DB_KEY_ID));
+ if (!wszId.IsEmpty() && !FindContactByUIN(wszId)) {
+ mir_cslock l(m_csCache);
+ m_arCache.insert(new IcqCacheItem(wszId, hContact));
+ }
+}
+
void CIcqProto::OnContactDeleted(MCONTACT hContact)
{
CMStringW szId(GetUserId(hContact));