summaryrefslogtreecommitdiff
path: root/protocols/Facebook/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-24 19:44:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-24 19:44:39 +0300
commitb682217c769d54b073b5052c9e458dbd81722274 (patch)
tree0b93c5cd960db03c6a60cfbc0eca7dcae1b545b9 /protocols/Facebook/src
parentf352e7958b6a97887da1db0aa75092fc4772cb23 (diff)
fixes #2800 (ICQ & Facebook create duplicate contacts after import in the service mode)
Diffstat (limited to 'protocols/Facebook/src')
-rw-r--r--protocols/Facebook/src/proto.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp
index bfb6f9e71a..2873b2d8d3 100644
--- a/protocols/Facebook/src/proto.cpp
+++ b/protocols/Facebook/src/proto.cpp
@@ -49,12 +49,6 @@ FacebookProto::FacebookProto(const char *proto_name, const wchar_t *username) :
m_bLoginInvisible(this, "LoginInvisible", false),
m_wszDefaultGroup(this, "DefaultGroup", L"Facebook")
{
- for (auto &cc : AccContacts()) {
- CMStringA szId(getMStringA(cc, DBKEY_ID));
- if (!szId.IsEmpty())
- m_users.insert(new FacebookUser(_atoi64(szId), cc, isChatRoom(cc)));
- }
-
// to upgrade previous settings
if (getByte("Compatibility") < 1) {
setByte("Compatibility", 1);
@@ -140,6 +134,13 @@ void FacebookProto::OnModulesLoaded()
cont.path = wszPath;
CallService(MS_SMILEYADD_LOADCONTACTSMILEYS, 0, LPARAM(&cont));
+ // contacts cache
+ for (auto &cc : AccContacts()) {
+ CMStringA szId(getMStringA(cc, DBKEY_ID));
+ if (!szId.IsEmpty())
+ m_users.insert(new FacebookUser(_atoi64(szId), cc, isChatRoom(cc)));
+ }
+
// Default group
Clist_GroupCreate(0, m_wszDefaultGroup);
}