libgaim/protocols/jabber/disco.c

changeset 15225
d04a059065dd
parent 15197
1d98528d4ee3
child 15265
a5b0ab58b05d
--- a/libgaim/protocols/jabber/disco.c	Sun Dec 10 22:01:22 2006 +0000
+++ b/libgaim/protocols/jabber/disco.c	Sun Dec 10 23:08:45 2006 +0000
@@ -23,6 +23,7 @@
 #include "prefs.h"
 
 #include "buddy.h"
+#include "google.h"
 #include "iq.h"
 #include "disco.h"
 #include "jabber.h"
@@ -250,6 +251,19 @@
 		if (!strcmp(name, "Google Talk"))
 			js->googletalk = TRUE;
 	}
+	
+	for (child = xmlnode_get_child(query, "feature"); child; 
+	     child = xmlnode_get_next_twin(child)) {
+		const char *var;
+		var = xmlnode_get_attrib(child, "var");
+		if (!var)
+			continue;
+
+		if (!strcmp("google:mail:notify", var)) {
+			js->server_caps |= JABBER_CAP_GMAIL_NOTIFY;
+			jabber_gmail_init(js);
+		}
+	}
 }
 
 static void

mercurial