changeset 28749:5550823608cb

merge of '5fc198b7a02aacaaa8a7045d9df437c2d0e9006b' and '667654b3309008b53bf4d9df02bd401d1ede8db5'
author Paul Aurich <paul@darkrain42.org>
date Tue, 13 Oct 2009 19:52:35 +0000
parents e191f5fedce1 (current diff) f55bd60e2738 (diff)
children 912b9999bbe6 ef513141e960 7c346c5a05d4
files ChangeLog
diffstat 4 files changed, 23 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Oct 13 17:24:38 2009 +0000
+++ b/ChangeLog	Tue Oct 13 19:52:35 2009 +0000
@@ -1,6 +1,14 @@
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
 version 2.6.3 (??/??/20??):
+	General:
+	* New 'plugins' sub-command to 'debug' command (i.e. '/debug plugins')
+	  to announce the list of loaded plugins (in both Finch and Pidgin).
+	* Fix a crash when performing DNS queries on Unixes that use the
+	  blocking DNS lookups.  (Brian Lu)
+	* Fix building the GnuTLS plugin with older versions of GnuTLS.
+	* Fix DNS TXT query resolution.
+
 	XMPP:
 	* Users connecting to Google Talk now have an "Initiate Chat" context menu
 	  option for their buddies.  (Eion Robb)
@@ -17,14 +25,6 @@
 	  as "ocs/user@domain.tld" and Sametime users are added as
 	  "ibm/sametime_id".  (Jason Cohen)
 
-	General:
-	* New 'plugins' sub-command to 'debug' command (i.e. '/debug plugins')
-	  to announce the list of loaded plugins (in both Finch and Pidgin).
-	* Fix a crash when performing DNS queries on Unixes that use the
-	  blocking DNS lookups.  (Brian Lu)
-	* Fix building the GnuTLS plugin with older versions of GnuTLS.
-	* Fix DNS TXT query resolution.
-
 	Finch:
 	* The TinyURL plugin now creates shorter URLs for long non-conversation
 	  URLs, e.g. URLs to open Inbox in Yahoo/MSN protocols, or the Yahoo
--- a/libpurple/protocols/msn/contact.c	Tue Oct 13 17:24:38 2009 +0000
+++ b/libpurple/protocols/msn/contact.c	Tue Oct 13 19:52:35 2009 +0000
@@ -356,9 +356,10 @@
 	char *type;
 	char *member_id;
 	MsnUser *user;
-	xmlnode *annotation;
+	xmlnode *annotation, *display;
 	guint nid = MSN_NETWORK_UNKNOWN;
 	char *invite = NULL;
+	char *display_text;
 
 	passport = xmlnode_get_data(xmlnode_get_child(member, node));
 	if (!purple_email_is_valid(passport)) {
@@ -368,7 +369,13 @@
 
 	type = xmlnode_get_data(xmlnode_get_child(member, "Type"));
 	member_id = xmlnode_get_data(xmlnode_get_child(member, "MembershipId"));
-	user = msn_userlist_find_add_user(session->userlist, passport, NULL);
+	if ((display = xmlnode_get_child(member, "DisplayName"))) {
+		display_text = xmlnode_get_data(display);
+	} else {
+		display_text = NULL;
+	}
+
+	user = msn_userlist_find_add_user(session->userlist, passport, display_text);
 
 	for (annotation = xmlnode_get_child(member, "Annotations/Annotation");
 	     annotation;
@@ -409,6 +416,7 @@
 	g_free(type);
 	g_free(member_id);
 	g_free(invite);
+	g_free(display_text);
 }
 
 static void
--- a/libpurple/protocols/msn/notification.c	Tue Oct 13 17:24:38 2009 +0000
+++ b/libpurple/protocols/msn/notification.c	Tue Oct 13 19:52:35 2009 +0000
@@ -963,7 +963,7 @@
 			if (cmd->trans->data) {
 				MsnFqyCbData *fqy_data = cmd->trans->data;
 				fqy_data->cb(session, passport, network, fqy_data->data);
-				/* Don't free fqy_data yet since the server responds to FQY multipe times.
+				/* Don't free fqy_data yet since the server responds to FQY multiple times.
 				   It will be freed when cmd->trans is freed. */
 			}
 
@@ -1098,7 +1098,6 @@
 	}
 
 	if (msn_user_set_friendly_name(user, friendly)) {
-		serv_got_alias(gc, passport, friendly);
 		msn_update_contact(session, passport, MSN_UPDATE_DISPLAY, friendly);
 	}
 	g_free(friendly);
@@ -1263,7 +1262,6 @@
 
 	if (msn_user_set_friendly_name(user, friendly))
 	{
-		serv_got_alias(gc, passport, friendly);
 		msn_update_contact(session, passport, MSN_UPDATE_DISPLAY, friendly);
 	}
 
--- a/libpurple/protocols/msn/user.c	Tue Oct 13 17:24:38 2009 +0000
+++ b/libpurple/protocols/msn/user.c	Tue Oct 13 19:52:35 2009 +0000
@@ -183,12 +183,15 @@
 {
 	g_return_val_if_fail(user != NULL, FALSE);
 
-	if (user->friendly_name && name && !strcmp(user->friendly_name, name))
+	if (user->friendly_name && name && (!strcmp(user->friendly_name, name) ||
+				!strcmp(user->passport, name)))
 		return FALSE;
 
 	g_free(user->friendly_name);
 	user->friendly_name = g_strdup(name);
 
+	serv_got_alias(purple_account_get_connection(user->userlist->session->account),
+			user->passport, name);
 	return TRUE;
 }