changeset 27742:49cb3fc2c01a

Add the camera-v1 cap or else Gmail refuses to accept we're video enabled.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Fri, 31 Jul 2009 04:20:30 +0000
parents 7da3bf6d3b2c
children 0e49276d9ba1
files libpurple/protocols/jabber/disco.c libpurple/protocols/jabber/presence.c
diffstat 2 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/disco.c	Thu Jul 30 03:42:26 2009 +0000
+++ b/libpurple/protocols/jabber/disco.c	Fri Jul 31 04:20: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	Thu Jul 30 03:42:26 2009 +0000
+++ b/libpurple/protocols/jabber/presence.c	Fri Jul 31 04:20: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;