Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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);
}
Exemplo n.º 3
0
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;
}