changeset 17051:1863cdac4be3

If Google Talk tells you a roster item as a none subscription, we probably don't ever want to show it. Fixes #1189
author Sean Egan <seanegan@gmail.com>
date Wed, 23 May 2007 21:27:24 +0000
parents 580c6c5d9480
children d9bf061cf202
files libpurple/protocols/jabber/google.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c	Wed May 23 21:15:54 2007 +0000
+++ b/libpurple/protocols/jabber/google.c	Wed May 23 21:27:24 2007 +0000
@@ -217,6 +217,14 @@
 	char *jid_norm = g_strdup(jabber_normalize(account, jid));
 
 	const char *grt = xmlnode_get_attrib_with_namespace(item, "t", "google:roster");
+	const char *subscription = xmlnode_get_attrib(item, "subscription");
+	
+	if (!strcmp(subscription, "none")) {
+		/* The Google Talk servers will automatically add people from your Gmail address book
+		 * with subscription=none. If we see someone with subscription=none, ignore them.
+		 */
+		return FALSE;
+	}
 	
 	while (list) {
 		if (!strcmp(jid_norm, (char*)list->data)) {