int FacebookProto::Authorize(HANDLE hDbEvent) { if (!hDbEvent || isOffline()) return 1; MCONTACT hContact = HContactFromAuthEvent(hDbEvent); if (hContact == INVALID_CONTACT_ID) return 1; return ApproveFriendship(hContact, NULL); }
int FacebookProto::AuthDeny(MEVENT hDbEvent, const TCHAR *) { if (!hDbEvent || isOffline()) return 1; MCONTACT hContact = HContactFromAuthEvent(hDbEvent); if (hContact == INVALID_CONTACT_ID) return 1; return DenyFriendship(hContact, NULL); }
int FacebookProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason) { if (!hDbEvent || isOffline()) return 1; MCONTACT hContact = HContactFromAuthEvent(hDbEvent); 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; }