diff options
author | George Hazan <ghazan@miranda.im> | 2020-09-07 17:14:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-09-07 17:14:27 +0300 |
commit | 7997d0ec5810ad7699d0de6417510ab756be320d (patch) | |
tree | db060d5db72816b2da70e92c8bf6a57a1d61bb49 | |
parent | 79cb42be4c83876c9e3ca8072a6deea8665733a7 (diff) |
Facebook: contact with the same id not to be added twice
-rw-r--r-- | protocols/Facebook/src/proto.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp index b385a4e379..993e85a0f6 100644 --- a/protocols/Facebook/src/proto.cpp +++ b/protocols/Facebook/src/proto.cpp @@ -157,6 +157,9 @@ MCONTACT FacebookProto::AddToList(int, PROTOSEARCHRESULT *psr) if (!mir_wstrlen(psr->id.w)) return 0; + if (auto *pUser = FindUser(_wtoi64(psr->id.w))) + return pUser->hContact; + MCONTACT hContact = db_add_contact(); Proto_AddToContact(hContact, m_szModuleName); setWString(hContact, DBKEY_ID, psr->id.w); |