summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/proto.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-05-17 20:15:33 +0000
committerRobert Pösel <robyer@seznam.cz>2016-05-17 20:15:33 +0000
commit5e5cabbee2c2249be4e34efc9bafa1b05136111a (patch)
tree5705bd162306f31b1d41dc2b1d48ae53ca4046d4 /protocols/FacebookRM/src/proto.cpp
parent82cd0bd751e964a84746740abd03a419b8b80532 (diff)
Facebook: Rework loading online contacts (not properly finished!); version bump
This is work in progress, which might (and will) cause wrong status reporting and maybe related problems. On the other hand this way is only "preferred" way. Previous way (using buddy_list request) isn't used anymore and might cause the captcha problems and antivirus checks from FB... git-svn-id: http://svn.miranda-ng.org/main/trunk@16843 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r--protocols/FacebookRM/src/proto.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 85f25595a4..79d2f30893 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -32,7 +32,6 @@ FacebookProto::FacebookProto(const char* proto_name, const TCHAR* username) :
avatar_lock_ = CreateMutex(NULL, FALSE, NULL);
log_lock_ = CreateMutex(NULL, FALSE, NULL);
update_loop_lock_ = CreateEvent(NULL, FALSE, FALSE, NULL);
- facy.buddies_lock_ = CreateMutex(NULL, FALSE, NULL);
facy.send_message_lock_ = CreateMutex(NULL, FALSE, NULL);
facy.fcb_conn_lock_ = CreateMutex(NULL, FALSE, NULL);
facy.notifications_lock_ = CreateMutex(NULL, FALSE, NULL);
@@ -121,7 +120,6 @@ FacebookProto::~FacebookProto()
WaitForSingleObject(signon_lock_, IGNORE);
WaitForSingleObject(avatar_lock_, IGNORE);
WaitForSingleObject(log_lock_, IGNORE);
- WaitForSingleObject(facy.buddies_lock_, IGNORE);
WaitForSingleObject(facy.send_message_lock_, IGNORE);
WaitForSingleObject(facy.notifications_lock_, IGNORE);
WaitForSingleObject(facy.cookies_lock_, IGNORE);
@@ -130,7 +128,6 @@ FacebookProto::~FacebookProto()
CloseHandle(avatar_lock_);
CloseHandle(log_lock_);
CloseHandle(update_loop_lock_);
- CloseHandle(facy.buddies_lock_);
CloseHandle(facy.send_message_lock_);
CloseHandle(facy.fcb_conn_lock_);
CloseHandle(facy.notifications_lock_);
@@ -646,15 +643,6 @@ INT_PTR FacebookProto::CheckFriendRequests(WPARAM, LPARAM)
return 0;
}
-INT_PTR FacebookProto::RefreshBuddyList(WPARAM, LPARAM)
-{
- if (!isOffline()) {
- facy.client_notify(TranslateT("Refreshing buddy list..."));
- ForkThread(&FacebookProto::ProcessBuddyList, NULL);
- }
- return 0;
-}
-
INT_PTR FacebookProto::VisitProfile(WPARAM wParam, LPARAM)
{
@@ -778,11 +766,12 @@ INT_PTR FacebookProto::CancelFriendship(WPARAM wParam, LPARAM lParam)
std::string *val = new std::string(id);
- if (deleting) {
+ // FIXME: Remember that we deleted this contact, so we won't accidentally add him at status change
+ /*if (deleting) {
facebook_user *fbu = facy.buddies.find(*val);
if (fbu != NULL)
fbu->handle = NULL;
- }
+ }*/
ForkThread(&FacebookProto::DeleteContactFromServer, val);
}