# HG changeset patch # User Daniel Atallah # Date 1133919139 0 # Node ID 553dd80f6130690d2fe1329b9bf32c6b887ab5e0 # Parent 24c5fbfca306eea64149372c8e8eae27646f03f7 [gaim-migrate @ 14684] Update msn to use gaim_account_notify_added and gaim_account_request_add. I'm not sure that the gaim_account_notify_added will ever get triggered because if you have ever had the buddy on your list they'll be in either your allow or deny list and hence the prompt wont show. It seems flawed that you can't remove a buddy from your allow list w/o having them added to your block list. committer: Tailor Script diff -r 24c5fbfca306 -r 553dd80f6130 src/protocols/msn/userlist.c --- a/src/protocols/msn/userlist.c Wed Dec 07 01:22:14 2005 +0000 +++ b/src/protocols/msn/userlist.c Wed Dec 07 01:32:19 2005 +0000 @@ -30,6 +30,7 @@ { GaimConnection *gc; char *who; + char *friendly; } MsnPermitAdd; @@ -43,14 +44,22 @@ { MsnSession *session = pa->gc->proto_data; MsnUserList *userlist = session->userlist; + GaimBuddy *buddy; msn_userlist_add_buddy(userlist, pa->who, MSN_LIST_AL, NULL); - /* TODO: This ask for the alias, right? */ - gaim_account_notify_added(pa->gc->account, NULL, pa->who, NULL, NULL); + buddy = gaim_find_buddy(pa->gc->account, pa->who); + + if (buddy != NULL) + gaim_account_notify_added(pa->gc->account, pa->who, + NULL, pa->friendly, NULL); + else + gaim_account_request_add(pa->gc->account, pa->who, + NULL, pa->friendly, NULL); } g_free(pa->who); + g_free(pa->friendly); g_free(pa); } @@ -66,6 +75,7 @@ } g_free(pa->who); + g_free(pa->friendly); g_free(pa); } @@ -75,9 +85,10 @@ MsnPermitAdd *pa; char *msg; - pa = g_new0(MsnPermitAdd, 1); + pa = g_new0(MsnPermitAdd, 1); pa->who = g_strdup(passport); - pa->gc = gc; + pa->friendly = (friendly != NULL) ? g_strdup(friendly) : NULL; + pa->gc = gc; if (friendly != NULL) {