Deny friend request

Hòa Hòa huyhoa at live.com
Tue Jun 7 00:19:39 EDT 2011


I am working on libpurple for my IM website like Meebo. All the basic functions are implemented, except that I can not using libpurple to deny a friend request. Below is my code:

I declare an uiop for account:
PurpleAccountUiOps null_account_uiops=
{
    NULL,
  
    NULL,

    NULL,
    accounts_request_authorization,
    
    NULL,

    NULL,
    NULL,
    NULL,
    NULL
}; 

Then I hook it to my program 
purple_accounts_set_ui_ops(&null_account_uiops);

Here is my callback accounts_request_authorization:

static void *accounts_request_authorization(PurpleAccount *account,
                               const char *remote_user,
                               const char *id,
                               const char *alias,
                               const char *message,
                               gboolean on_list,
                               PurpleAccountRequestAuthorizationCb auth_cb,
                               PurpleAccountRequestAuthorizationCb deny_cb,
                               void *user_data)
     {
                               deny_cb(user_data);

                   
    }

But it does not seem to work, the friend request is still there on the next login.

If I replace deny_cb with  auth_cb in the callback, then it works fine (the friend request is accepted)

Thank you!

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20110607/9e30b524/attachment-0002.html>


More information about the Devel mailing list