changeset 20472:2479ccd1e7fe

Unescape our own status messages before sending them to the server so other clients show them correctly. Thanks to Simom for the patch. Fixes #738
author Carlos Silva <typ0@pidgin.im>
date Tue, 17 Jul 2007 19:12:12 +0000
parents 530a92d50c5e
children 49baf4a0ae39
files libpurple/protocols/msn/state.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/state.c	Tue Jul 17 00:35:50 2007 +0000
+++ b/libpurple/protocols/msn/state.c	Tue Jul 17 19:12:12 2007 +0000
@@ -219,6 +219,7 @@
 	MsnTransaction *trans;
 	char *payload;
 	const char *statusline;
+	gchar *unescapedstatusline;
 
 	g_return_if_fail(session != NULL);
 	g_return_if_fail(session->notification != NULL);
@@ -232,10 +233,12 @@
 	presence = purple_account_get_presence(account);
 	status = purple_presence_get_active_status(presence);
 	statusline = purple_status_get_attr_string(status, "message");
-	session->psm = msn_build_psm(statusline, NULL, NULL);
+	unescapedstatusline = purple_unescape_html(statusline);
+	session->psm = msn_build_psm(unescapedstatusline, NULL, NULL);
+	g_free(unescapedstatusline);
 	payload = session->psm;
 
-	purple_debug_info("MSNP14","UUX{%s}\n",payload);
+	purple_debug_misc("MSNP14","Sending UUX command with payload: %s\n",payload);
 	trans = msn_transaction_new(cmdproc, "UUX","%d",strlen(payload));
 	msn_transaction_set_payload(trans, payload, strlen(payload));
 	msn_cmdproc_send_trans(cmdproc, trans);