comparison libpurple/protocols/jabber/google.c @ 17040: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 3d0aec991e5d
children 0018ab54be9c
comparison
equal deleted inserted replaced
17039:580c6c5d9480 17040:1863cdac4be3
215 gboolean on_block_list = FALSE; 215 gboolean on_block_list = FALSE;
216 216
217 char *jid_norm = g_strdup(jabber_normalize(account, jid)); 217 char *jid_norm = g_strdup(jabber_normalize(account, jid));
218 218
219 const char *grt = xmlnode_get_attrib_with_namespace(item, "t", "google:roster"); 219 const char *grt = xmlnode_get_attrib_with_namespace(item, "t", "google:roster");
220 const char *subscription = xmlnode_get_attrib(item, "subscription");
221
222 if (!strcmp(subscription, "none")) {
223 /* The Google Talk servers will automatically add people from your Gmail address book
224 * with subscription=none. If we see someone with subscription=none, ignore them.
225 */
226 return FALSE;
227 }
220 228
221 while (list) { 229 while (list) {
222 if (!strcmp(jid_norm, (char*)list->data)) { 230 if (!strcmp(jid_norm, (char*)list->data)) {
223 on_block_list = TRUE; 231 on_block_list = TRUE;
224 break; 232 break;