Mercurial > pidgin.yaz
changeset 12378:c9aeafdb445e
[gaim-migrate @ 14682]
Update yahoo to use gaim_account_notify_added and gaim_account_request_add
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 07 Dec 2005 00:05:06 +0000 |
parents | b94069a95be7 |
children | 24c5fbfca306 |
files | src/protocols/yahoo/yahoo.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c Wed Dec 07 00:04:50 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Wed Dec 07 00:05:06 2005 +0000 @@ -817,8 +817,14 @@ static void yahoo_buddy_add_authorize_cb(struct yahoo_add_request *add_req, const char *msg) { - gaim_account_notify_added(add_req->gc->account, add_req->id, - add_req->who, NULL, add_req->msg); + GaimBuddy *buddy = gaim_find_buddy(add_req->gc->account, add_req->who); + + if (buddy != NULL) + gaim_account_notify_added(add_req->gc->account, add_req->who, + add_req->id, NULL, add_req->msg); + else + gaim_account_request_add(add_req->gc->account, add_req->who, + add_req->id, NULL, add_req->msg); g_free(add_req->id); g_free(add_req->who);