diff libpurple/protocols/jabber/roster.c @ 28767:9ab75ab032b4

jabber: The google roster request code was so lonely, so let's just drop-kick it and add the little custom logic to roster.c
author Paul Aurich <paul@darkrain42.org>
date Sun, 06 Dec 2009 22:44:20 +0000
parents 0f7025534fc5
children 7c543cbf52c0
line wrap: on
line diff
--- a/libpurple/protocols/jabber/roster.c	Sun Dec 06 19:26:52 2009 +0000
+++ b/libpurple/protocols/jabber/roster.c	Sun Dec 06 22:44:20 2009 +0000
@@ -87,8 +87,13 @@
 	iq = jabber_iq_new_query(js, JABBER_IQ_GET, "jabber:iq:roster");
 	query = xmlnode_get_child(iq->node, "query");
 	xmlnode_set_attrib(query, "ver", ver);
+
+	if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) {
+		xmlnode_set_attrib(query, "xmlns:gr", NS_GOOGLE_ROSTER);
+		xmlnode_set_attrib(query, "gr:ext", "2");
+	}
+
 	jabber_iq_set_callback(iq, roster_request_cb, NULL);
-
 	jabber_iq_send(iq);
 }
 
@@ -334,7 +339,7 @@
 
 	if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) {
 		jabber_google_roster_outgoing(js, query, item);
-		xmlnode_set_attrib(query, "xmlns:gr", "google:roster");
+		xmlnode_set_attrib(query, "xmlns:gr", NS_GOOGLE_ROSTER);
 		xmlnode_set_attrib(query, "gr:ext", "2");
 	}
 	jabber_iq_send(iq);