#
# old_revision [a12c0e83e315f6ccc2e24fd4c56217414a9393e9]
#
# patch "libpurple/blist.h"
#  from [8a1cb3e38b767107811af6ea4cf78abb0a1b64f0]
#    to [4a1bf3d9797a8826185d681f69fc46b67bd0df5b]
# 
# patch "libpurple/conversation.c"
#  from [d272e427e9274e088c365ba0b1e0b5c7bf169a70]
#    to [5c5eb4981f907f317962114079ea381a9bf2c434]
# 
# patch "libpurple/protocols/msn/msg.c"
#  from [dc2729e8a7c8eece16f25fb64d605b501a127ea4]
#    to [5d3f4e175118d068f6fc0a22e294836343709109]
#
============================================================
--- libpurple/blist.h	8a1cb3e38b767107811af6ea4cf78abb0a1b64f0
+++ libpurple/blist.h	4a1bf3d9797a8826185d681f69fc46b67bd0df5b
@@ -140,6 +140,7 @@ struct _PurpleBuddy {
 	char *name;                             /**< The name of the buddy. */
 	char *alias;                            /**< The user-set alias of the buddy */
 	char *server_alias;                     /**< The server-specified alias of the buddy.  (i.e. MSN "Friendly Names") */
+	char *special_alias;                    /**< Special Alias in certain situations. (i.e. MSN Group Chat names) */
 	void *proto_data;                       /**< This allows the prpl to associate whatever data it wants with a buddy */
 	PurpleBuddyIcon *icon;                    /**< The buddy icon. */
 	PurpleAccount *account;					/**< the account this buddy belongs to */
============================================================
--- libpurple/conversation.c	d272e427e9274e088c365ba0b1e0b5c7bf169a70
+++ libpurple/conversation.c	5c5eb4981f907f317962114079ea381a9bf2c434
@@ -969,6 +969,8 @@ purple_conversation_write(PurpleConversa
 
 				if (purple_account_get_alias(account) != NULL)
 					alias = account->alias;
+				else if (b != NULL && b->special_alias != NULL)
+					alias = b->special_alias;
 				else if (b != NULL && !purple_strequal(purple_buddy_get_name(b), purple_buddy_get_contact_alias(b)))
 					alias = purple_buddy_get_contact_alias(b);
 				else if (purple_connection_get_display_name(gc) != NULL)
@@ -981,7 +983,12 @@ purple_conversation_write(PurpleConversa
 				b = purple_find_buddy(account, who);
 
 				if (b != NULL)
-					alias = purple_buddy_get_contact_alias(b);
+				{
+					if (b->special_alias != NULL)
+						alias = b->special_alias;
+					else 
+						alias = purple_buddy_get_contact_alias(b);
+				}
 			}
 		}
 	}
============================================================
--- libpurple/protocols/msn/msg.c	dc2729e8a7c8eece16f25fb64d605b501a127ea4
+++ libpurple/protocols/msn/msg.c	5d3f4e175118d068f6fc0a22e294836343709109
@@ -726,14 +726,14 @@ msn_message_show_readable(MsnMessage *ms
 	str = g_string_new(NULL);
 
 	/* Standard header. */
-	if (msg->charset == NULL)
+	if (msg->charset == NULL && msg->content_type != NULL)
 	{
 		g_string_append_printf(str,
 				   "MIME-Version: 1.0\r\n"
 				   "Content-Type: %s\r\n",
 				   msg->content_type);
 	}
-	else
+	else if (msg->content_type != NULL)
 	{
 		g_string_append_printf(str,
 				   "MIME-Version: 1.0\r\n"
@@ -846,6 +846,19 @@ msn_plain_msg(MsnCmdProc *cmdproc, MsnMe
 	}
 #endif
 
+	/* Get the group member nick */
+	PurpleBuddy *buddy = purple_find_buddy(cmdproc->session->account, passport);
+	if ((value = msn_message_get_attr(msg, "P4-Context")) != NULL)
+	{
+		g_free(buddy->special_alias);
+		buddy->special_alias = g_strdup(value);
+	}
+	else
+	{
+		g_free(buddy->special_alias);
+		buddy->special_alias = NULL;
+	}
+
 	if ((value = msn_message_get_attr(msg, "X-MMS-IM-Format")) != NULL)
 	{
 		char *pre, *post;
