changeset 23095:56d958e7b7d1

Fix a TODO uncovered by Mark the other day. Instead of using a hacky content-type with appended \r\n to make the message attribute look like part of the body, just put the ID: 1 in the body of the message for the nudge datacast.
author Stu Tomlinson <stu@nosnilmot.com>
date Fri, 23 May 2008 13:08:08 +0000
parents f057f9533634
children 3b54c57749e8
files libpurple/protocols/msn/msg.c libpurple/protocols/msnp9/msg.c
diffstat 2 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msg.c	Fri May 23 13:04:50 2008 +0000
+++ b/libpurple/protocols/msn/msg.c	Fri May 23 13:08:08 2008 +0000
@@ -151,10 +151,9 @@
 	MsnMessage *msg;
 
 	msg = msn_message_new(MSN_MSG_NUDGE);
-	/* TODO: This shouldn't have a \r\n in it, should it?? */
-	msn_message_set_content_type(msg, "text/x-msnmsgr-datacast\r\n");
+	msn_message_set_content_type(msg, "text/x-msnmsgr-datacast");
 	msn_message_set_flag(msg, 'N');
-	msn_message_set_attr(msg,"ID","1\r\n");
+	msn_message_set_bin_data(msg, "ID: 1\r\n", 7);
 
 	return msg;
 }
--- a/libpurple/protocols/msnp9/msg.c	Fri May 23 13:04:50 2008 +0000
+++ b/libpurple/protocols/msnp9/msg.c	Fri May 23 13:08:08 2008 +0000
@@ -158,10 +158,9 @@
 	MsnMessage *msg;
 
 	msg = msn_message_new(MSN_MSG_NUDGE);
-	/* TODO: This shouldn't have a \r\n in it, should it?? */
-	msn_message_set_content_type(msg, "text/x-msnmsgr-datacast\r\n");
+	msn_message_set_content_type(msg, "text/x-msnmsgr-datacast");
 	msn_message_set_flag(msg, 'N');
-	msn_message_set_attr(msg,"ID","1\r\n");
+	msn_message_set_bin_data(msg, "ID: 1\r\n", 7);
 
 	return msg;
 }