pidgin: b66da85d: Add the camera-v1 cap or else Gmail refu...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Fri Jul 31 00:25:30 EDT 2009


-----------------------------------------------------------------
Revision: b66da85de52dbcd99da3c6571add291b12b427ea
Ancestor: bbfef532c4fbf5aa48df32d5b551002e69d28d93
Author: maiku at soc.pidgin.im
Date: 2009-07-31T04:20:30
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b66da85de52dbcd99da3c6571add291b12b427ea

Modified files:
        libpurple/protocols/jabber/disco.c
        libpurple/protocols/jabber/presence.c

ChangeLog: 

Add the camera-v1 cap or else Gmail refuses to accept we're video enabled.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/disco.c	8f912773709e9faeb4b51cef302e1d021e8c421a
+++ libpurple/protocols/jabber/disco.c	28aeca60b7204de78f444e3b2dca4f978ca0465a
@@ -166,6 +166,18 @@ void jabber_disco_info_parse(JabberStrea
 			 */
 			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;
============================================================
--- libpurple/protocols/jabber/presence.c	fa816cb3fa1b956a4e1490e3112f53390492e118
+++ libpurple/protocols/jabber/presence.c	1e70e6039d2b476f08c5151df6f450370b5176d5
@@ -324,11 +324,11 @@ xmlnode *jabber_presence_create_js(Jabbe
 	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;


More information about the Commits mailing list