merge of 'bbb51b6744ec4e0bf86eb789372b86582181af56'

Fri, 31 Jul 2009 04:21:30 +0000

author
Michael Ruprecht <maiku@pidgin.im>
date
Fri, 31 Jul 2009 04:21:30 +0000
changeset 28029
2ec56ef75006
parent 28026
bbb51b6744ec (current diff)
parent 28028
774400bac46f (diff)
child 28030
284f783cffb6

merge of 'bbb51b6744ec4e0bf86eb789372b86582181af56'
and '774400bac46fe2557962abd53cbb0c4bfc91d95a'

--- a/libpurple/protocols/jabber/disco.c	Fri Jul 31 04:21:28 2009 +0000
+++ b/libpurple/protocols/jabber/disco.c	Fri Jul 31 04:21:30 2009 +0000
@@ -166,6 +166,18 @@
 			 */
 			xmlnode *feature = xmlnode_new_child(query, "feature");
 			xmlnode_set_attrib(feature, "var", "http://www.google.com/xmpp/protocol/video/v1");
+		} else if (g_str_equal(node, CAPS0115_NODE "#" "camera-v1")) {
+			/*
+			 * HUGE HACK! We advertise this ext (see jabber_presence_create_js
+			 * where we add <c/> to the <presence/>) for the Google Talk
+			 * clients that don't actually check disco#info features.
+			 *
+			 * This specific feature is redundant but is what
+			 * node='http://mail.google.com/xmpp/client/caps', ver='1.1'
+			 * advertises as 'camera-v1'.
+			 */
+			xmlnode *feature = xmlnode_new_child(query, "feature");
+			xmlnode_set_attrib(feature, "var", "http://www.google.com/xmpp/protocol/camera/v1");
 #endif
 		} else {
 			xmlnode *error, *inf;
--- a/libpurple/protocols/jabber/presence.c	Fri Jul 31 04:21:28 2009 +0000
+++ b/libpurple/protocols/jabber/presence.c	Fri Jul 31 04:21:30 2009 +0000
@@ -324,11 +324,11 @@
 	video_enabled = jabber_video_enabled(js, NULL /* unused */);
 
 	if (audio_enabled && video_enabled)
-		xmlnode_set_attrib(c, "ext", "voice-v1 video-v1");
+		xmlnode_set_attrib(c, "ext", "voice-v1 camera-v1 video-v1");
 	else if (audio_enabled)
 		xmlnode_set_attrib(c, "ext", "voice-v1");
 	else if (video_enabled)
-		xmlnode_set_attrib(c, "ext", "video-v1");
+		xmlnode_set_attrib(c, "ext", "camera-v1 video-v1");
 #endif
 
 	return presence;

mercurial