changeset 25773:f47429b5ab52

propagate from branch 'im.pidgin.pidgin' (head 9ba9fc8e618e033ab6a9245be2210194b6364e75) to branch 'org.darkrain42.pidgin.xmpp' (head cf5f217d261ff97cb9aa1bf55e4c2730956824e7)
author Paul Aurich <paul@darkrain42.org>
date Sat, 29 Nov 2008 21:41:55 +0000
parents e1c38e93d5c3 (diff) c4eb9f10ecb5 (current diff)
children 514051f3b6cf
files libpurple/protocols/jabber/buddy.c
diffstat 3 files changed, 31 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Nov 29 18:41:39 2008 +0000
+++ b/ChangeLog	Sat Nov 29 21:41:55 2008 +0000
@@ -8,24 +8,32 @@
 	  --with-system-ssl-certs and GnuTLS need to include these in the
 	  system certs directory.
 	* Corrected maximum message lengths for Yahoo!
-	* Fix some problems with Gadu-Gadu buddy icons (Adam Strzelecki)
 	* Enable auto-reply on Zephyr, to emulate 'zaway' (Toby Schaffer)
 	* The Buddy State Notification plugin no longer prints duplicate
 	  notifications when the same buddy is in multiple groups (Florian Quèze)
 	* The Buddy State Notification plugin no longer turns JID's, MSN Passport
 	  ID's, etc. into links (Florian Quèze)
 	* Fix a crash in SIMPLE when a malformed message is received.
-	* Fix the namespace URL we look for in PEP reply stanzas to match the URL
-	  used in the 'get' requests (Paul Aurich)
-	* XMPP resources can be set to the local machine's hostname by using
-	  __HOSTNAME__ as the resource string (Jonathan Sailor)
-	* XMPP resources can now be left blank, causing the server to generate a
-	  resource for us (Jonathan Sailor)
-	* XMPP resources now default to no value
+
+	Gadu-Gadu:
+	* Fix some problems with Gadu-Gadu buddy icons (Adam Strzelecki)
 	* Gadu-Gadu now validates that UID's are valid (Adam Strzelecki)
 	* Gadu-Gadu now does proper charset translations where needed (Adam
 	  Strzelecki)
 
+	XMPP:
+	* Fix the namespace URL we look for in PEP reply stanzas to match the URL
+	  used in the 'get' requests (Paul Aurich)
+	* Resources can be set to the local machine's hostname by using
+	  __HOSTNAME__ as the resource string (Jonathan Sailor)
+	* Resources can now be left blank, causing the server to generate a
+	  resource for us where supported (Jonathan Sailor)
+	* Resources now default to no value
+	* Quit trying to get user info for MUC's (Paul Aurich)
+	* Send "client-accepts-full-bind-result" attribute during SASL login.
+	  This will fix Google Talk login failures if the user configures the
+	  wrong domain for his/her account.
+
 	Pidgin:
 	* On GTK+ 2.14 and higher, we're using the gtk-tooltip-delay setting
 	  instead of our own (hidden) tooltip_delay pref.  If you had
--- a/libpurple/protocols/jabber/auth.c	Sat Nov 29 18:41:39 2008 +0000
+++ b/libpurple/protocols/jabber/auth.c	Sat Nov 29 21:41:55 2008 +0000
@@ -397,6 +397,10 @@
 		auth = xmlnode_new("auth");
 		xmlnode_set_namespace(auth, "urn:ietf:params:xml:ns:xmpp-sasl");
 		xmlnode_set_attrib(auth, "mechanism", js->current_mech);
+		
+		xmlnode_set_attrib(auth, "xmlns:ga", "http://www.google.com/talk/protocol/auth");
+		xmlnode_set_attrib(auth, "ga:client-uses-full-bind-result", "true");
+
 		if (clientout) {
 			if (coutlen == 0) {
 				xmlnode_insert_data(auth, "=", -1);
--- a/libpurple/protocols/jabber/buddy.c	Sat Nov 29 18:41:39 2008 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Sat Nov 29 21:41:55 2008 +0000
@@ -1796,12 +1796,21 @@
 void jabber_buddy_get_info(PurpleConnection *gc, const char *who)
 {
 	JabberStream *js = gc->proto_data;
-	char *bare_jid = jabber_get_bare_jid(who);
+	JabberID *jid = jabber_id_new(who);
+
+	if (!jid)
+		return;
 
-	if(bare_jid) {
+	if (jabber_chat_find(js, jid->node, jid->domain)) {
+		/* For a conversation, include the resource (indicates the user). */
+		jabber_buddy_get_info_for_jid(js, who);
+	} else {
+		char *bare_jid = jabber_get_bare_jid(who);
 		jabber_buddy_get_info_for_jid(js, bare_jid);
 		g_free(bare_jid);
 	}
+
+	jabber_id_free(jid);
 }
 
 static void jabber_buddy_set_invisibility(JabberStream *js, const char *who,