Mercurial > pidgin.yaz
changeset 15467:2c81b0a81790
Make deleting Google Talk buddies work
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 30 Jan 2007 21:04:04 +0000 |
parents | cc1721b06dc6 |
children | 146d7ba60667 4fcf3a17f03e 015ad1283216 |
files | libpurple/protocols/jabber/google.c libpurple/protocols/jabber/google.h libpurple/protocols/jabber/roster.c |
diffstat | 3 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c Tue Jan 30 17:29:00 2007 +0000 +++ b/libpurple/protocols/jabber/google.c Tue Jan 30 21:04:04 2007 +0000 @@ -206,7 +206,7 @@ } -void jabber_google_roster_incoming(JabberStream *js, xmlnode *item) +gboolean jabber_google_roster_incoming(JabberStream *js, xmlnode *item) { GaimAccount *account = gaim_connection_get_account(js->gc); GSList *list = account->deny; @@ -225,6 +225,12 @@ list = list->next; } + if (grt && (*grt == 'H' || *grt == 'h')) { + GaimBuddy *buddy = gaim_find_buddy(account, jid_norm); + gaim_blist_remove_buddy(buddy); + return FALSE; + } + if (!on_block_list && (grt && (*grt == 'B' || *grt == 'b'))) { gaim_debug_info("jabber", "Blocking %s\n", jid_norm); gaim_privacy_deny_add(account, jid_norm, TRUE); @@ -232,6 +238,7 @@ gaim_debug_info("jabber", "Unblocking %s\n", jid_norm); gaim_privacy_deny_remove(account, jid_norm, TRUE); } + return TRUE; } void jabber_google_roster_add_deny(GaimConnection *gc, const char *who)
--- a/libpurple/protocols/jabber/google.h Tue Jan 30 17:29:00 2007 +0000 +++ b/libpurple/protocols/jabber/google.h Tue Jan 30 21:04:04 2007 +0000 @@ -31,7 +31,11 @@ void jabber_google_roster_init(JabberStream *js); void jabber_google_roster_outgoing(JabberStream *js, xmlnode *query, xmlnode *item); -void jabber_google_roster_incoming(JabberStream *js, xmlnode *item); + +/* Returns FALSE if this should short-circuit processing of this roster item, or TRUE + * if this roster item should continue to be processed + */ +gboolean jabber_google_roster_incoming(JabberStream *js, xmlnode *item); void jabber_google_roster_add_deny(GaimConnection *gc, const char *who); void jabber_google_roster_rem_deny(GaimConnection *gc, const char *who);
--- a/libpurple/protocols/jabber/roster.c Tue Jan 30 17:29:00 2007 +0000 +++ b/libpurple/protocols/jabber/roster.c Tue Jan 30 21:04:04 2007 +0000 @@ -226,7 +226,8 @@ groups = g_slist_append(groups, group_name); } if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) - jabber_google_roster_incoming(js, item); + if (!jabber_google_roster_incoming(js, item)) + continue; add_gaim_buddies_in_groups(js, jid, name, groups); } }