libpurple buddy add issues with msn

Duncan Berriman duncan at dcl.co.uk
Sat Dec 18 06:50:12 EST 2010


Hi Elliott,

OK I've added the following

static PurpleAccountUiOps account_uiops =
{
     notify_added,              /* notify_added          */
     status_changed,            /* status_changed        */
     request_add,               /* request_add           */
     request_authorize,         /* request_authorize     */
     NULL,                      /* close_account_request */
     NULL,
     NULL,
     NULL,
     NULL
}

I know status_changed and request_authorize are working. I can see the 
status changes in my log and an incoming request is accepted/rejected as 
required.

However whatever I do an incoming or outgoing buddy still isn't added to 
my msn account.

notify_added and request_add do not appear to be called. All I am doing 
in them is displaying a message which does not get called.

buddy = purple_buddy_new(account,"buddy at hotmail.com",NULL);
purple_blist_add_buddy(buddy, NULL, NULL, NULL);
purple_account_add_buddy(account,buddy);

Guess I need to look at the differences between the gtalk and msn code 
to understand what is going on under the bonnet. I'm clearly not 
understanding something here.

Thanks for your help.
Duncan

On 18/12/2010 01:06, Elliott Sales de Andrade wrote:
> On Fri, Dec 17, 2010 at 7:11 PM, Duncan Berriman<duncan at dcl.co.uk>  wrote:
>> Hi Elliott,
>>
>> Thanks for that but must say I am a little confused but I am new to this
>> (just a couple of days). I have a command line client that is working
>> save for this functionality. If I can get msn buddies to work then I am
>> pretty much finished apart from testing it to death.
>>
>> As I have no gui in my client and there is no one to answer an
>> interactive question. I can't see a signal handler in the request api so
>> not sure how I can proceed, unless I can use the request uiops in some way.
>>
> Yes, you need to implement the request uiops. It will unfortunately be
> a bit of a hack. We can't really change the API until 3.0.
>
>> I'll look at the source for the msn prpl but surely its up to the client
>> program/programmer to ask questions rather than the underlying protocol
>> handler.
>>
> The uiops tell the UI to ask the user a question.
>
>> I'd have thought by the program saying 'purple_account_add_buddy' it
>> would be implicit I wanted it to send an invite as it is with google but
>> I guess not.
>>
> GTalk has invite requests, but no invite messages.
>
>> Is there any simple way round this?
>>
>> Thanks for your help. Much appreciated.
>> Duncan
>>
>> On 17/12/2010 22:52, Elliott Sales de Andrade wrote:
>>>   On Fri, Dec 17, 2010 at 2:42 PM, Duncan Berriman<duncan at dcl.co.uk>
>>> wrote:
>>>>   Hi,
>>>>
>>>>   I am trying to add a buddy using libpurple with msn.
>>>>
>>>>   I’m doing the following to add a new buddy….
>>>>
>>>>                  buddy =
>>>> purple_buddy_new(account,"buddy at hotmail.com",NULL);
>>>>                  purple_blist_add_buddy(buddy, NULL, NULL, NULL);
>>>>                  purple_account_add_buddy(account,buddy);
>>>>
>>>>   code works fine with googletalk but on msn the buddy never receives the
>>>>   request and the buddy is not added to the msn buddy list.
>>>>
>>>>   Using version 2.7.7 on centos 5.5
>>>>
>>>>   Any ideas why this is not working as I’m stumped. I’ve even created a
>>>> brand
>>>>   new msn account for my client to connect and the only thing it has
>>>> attempted
>>>>   to do is sign on (with success) and add a buddy (seemingly with success
>>>> but
>>>>   nothing happens). As I mentioned above same code with google works first
>>>>   time.
>>>>
>>>   The MSN prpl pops up a request for the invite message. You would see
>>>   the same thing on an Oscar account (AIM/ICQ). You need to implement
>>>   the request API.
>>>
>>>>   Thanks
>>>>   Duncan
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at pidgin.im
>> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>>
>
>




More information about the Devel mailing list