From 2068ce37b91a72fb12471275d9402348c7b789f4 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 20 Jan 2010 15:12:37 -0500 Subject: [PATCH] Can't check whether libpurple thinks re-auth is needed if not yet on list. --- thperl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/thperl.c b/thperl.c index 018881a..0e5bcee 100644 --- a/thperl.c +++ b/thperl.c @@ -194,7 +194,15 @@ int thrasher_action_buddy_add (char *jid, char *buddy_name) * contact". Otherwise, they'd always be handled as no-ops because * the libpurple buddy is already present. */ - gboolean need_auth = ! thrasher_account_buddy_is_authorized(account, buddy); + gboolean need_auth; + if (buddy) { + /* Re-add: check if (re-)auth is needed. */ + need_auth = ! thrasher_account_buddy_is_authorized(account, buddy); + } + else { + /* Not yet on list: assume an auth request is needed. */ + need_auth = 1; + } /* FIXME: There's no cross-prpl calls for checking/sending * authorization like oscar.c:purple_auth_request()? Could try to * parse for the menu items added by each prpl we know requires -- 2.11.4.GIT