diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-07-30 22:36:59 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-07-30 22:36:59 +0000 |
commit | 6dcfe55905a55fad9169a26d434c93ca15d0717f (patch) | |
tree | 618f69a07800ac13c95c52f8ef90754a0d52ded4 /protocols/FacebookRM/src/proto.cpp | |
parent | 4c117da80411021cabef4a40ebfaad05c6a7ff8b (diff) |
Facebook: Support for denying friendship requests
git-svn-id: http://svn.miranda-ng.org/main/trunk@9999 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index a4517e2a24..0f8685b91b 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -308,12 +308,7 @@ int FacebookProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason) if (hContact == INVALID_CONTACT_ID) return 1; - // TODO: hide from facebook requests list - - if (db_get_b(hContact, "CList", "NotOnList", 0)) - CallService(MS_DB_CONTACT_DELETE, hContact, 0); - - return 0; + return DenyFriendship(hContact, NULL); } int FacebookProto::GetInfo(MCONTACT hContact, int infoType) @@ -730,6 +725,18 @@ INT_PTR FacebookProto::ApproveFriendship(WPARAM wParam,LPARAM lParam) return 0; } +INT_PTR FacebookProto::DenyFriendship(WPARAM wParam, LPARAM lParam) +{ + if (wParam == NULL || isOffline()) + return 1; + + MCONTACT *hContact = new MCONTACT((MCONTACT)wParam); + + ForkThread(&FacebookProto::IgnoreFriendshipRequest, hContact); + + return 0; +} + INT_PTR FacebookProto::OnCancelFriendshipRequest(WPARAM wParam,LPARAM lParam) { if (wParam == NULL || isOffline()) |