If Google Talk tells you a roster item as a none subscription, we probably don't ever want to show it. Fixes #1189

Wed, 23 May 2007 21:27:24 +0000

author
Sean Egan <seanegan@pidgin.im>
date
Wed, 23 May 2007 21:27:24 +0000
changeset 17148
db0801f13aa8
parent 17147
d5ec5f6ab84c
child 17149
8736904e1219

If Google Talk tells you a roster item as a none subscription, we probably don't ever want to show it. Fixes #1189

libpurple/protocols/jabber/google.c file | annotate | diff | comparison | revisions
--- 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)) {

mercurial