diff options
author | Robert Pösel <robyer@seznam.cz> | 2016-09-04 14:05:03 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2016-09-04 14:05:03 +0000 |
commit | 4529adfa0ed7e69ffc3729144cd07c9a482f150f (patch) | |
tree | 1e79ce5a12e94b889b67cfcb964db9cce72bc497 /protocols/FacebookRM/src/proto.cpp | |
parent | 3dd0a1f40f3234973f41ed96d7d4890a560d95da (diff) |
Facebook: Fix sometimes wrongly identified users as friends
Also fixes related problem when it was showing "user was removed from server list" popup even when user was never your friend (due to problem above).
git-svn-id: http://svn.miranda-ng.org/main/trunk@17252 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 02bd8e8d3d..291911d345 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -364,8 +364,10 @@ int FacebookProto::GetInfo(MCONTACT hContact, int) setByte(hContact, "Gender", fbu.gender); } - if (fbu.type == CONTACT_PAGE || fbu.type == CONTACT_FRIEND) { - if (getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE) != fbu.type) { + int oldType = getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, CONTACT_NONE); + // From server we won't get request/approve types, only none, so we don't want to overwrite and lost it in that case + if (fbu.type != CONTACT_NONE || (oldType != CONTACT_REQUEST && oldType != CONTACT_APPROVE)) { + if (oldType != fbu.type) { setByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, fbu.type); } } |