diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-15 19:24:33 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-15 19:24:33 +0300 |
commit | efbd3e90b66f16d3aac1d99f15ce7f2f83477b4e (patch) | |
tree | 1e5534937869140beab61340a56b37278cd4bfbb /protocols/Facebook/src | |
parent | dd01d74a7fe2ba22980476dd06b6efafd80c31a8 (diff) |
Facebook: all garbage contacts (not included into our friend list) are filtered out
Diffstat (limited to 'protocols/Facebook/src')
-rw-r--r-- | protocols/Facebook/src/server.cpp | 10 | ||||
-rw-r--r-- | protocols/Facebook/src/version.h | 2 |
2 files changed, 10 insertions, 2 deletions
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 <stdver.h> |