From efbd3e90b66f16d3aac1d99f15ce7f2f83477b4e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 15 May 2020 19:24:33 +0300 Subject: Facebook: all garbage contacts (not included into our friend list) are filtered out --- protocols/Facebook/src/server.cpp | 10 +++++++++- protocols/Facebook/src/version.h | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'protocols/Facebook/src') diff --git a/protocols/Facebook/src/server.cpp b/protocols/Facebook/src/server.cpp index 4106e4781c..deca30a243 100644 --- a/protocols/Facebook/src/server.cpp +++ b/protocols/Facebook/src/server.cpp @@ -145,9 +145,17 @@ int FacebookProto::RefreshContacts() MCONTACT hContact; if (id != m_uid) { + bool bIsFriend = n["friendship_status"].as_mstring() == L"ARE_FRIENDS"; + auto *pUser = FindUser(id); - if (pUser == nullptr) + if (pUser == nullptr) { + if (!bIsFriend) + continue; pUser = AddContact(wszId, false); + } + else if (!bIsFriend) + Contact_RemoveFromList(pUser->hContact); // adios! + hContact = pUser->hContact; } else hContact = 0; diff --git a/protocols/Facebook/src/version.h b/protocols/Facebook/src/version.h index 8a4aff26a6..e9df1063b4 100644 --- a/protocols/Facebook/src/version.h +++ b/protocols/Facebook/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 1 #define __RELEASE_NUM 0 -#define __BUILD_NUM 6 +#define __BUILD_NUM 7 #include -- cgit v1.2.3