changeset 19571:de0ae9a3eee2

merge of '67ad9f243a5d108c552110366d15b0e921e0c681' and 'eec0eedd7a4133ae0c0a9d952b8d507369bbc36f'
author Mark Doliner <mark@kingant.net>
date Sun, 02 Sep 2007 08:00:54 +0000
parents 60fc9cadbd92 (current diff) 94a2a1ccd6ec (diff)
children cfc4e56a6a1e dd4b1dc8a0ce
files
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Sun Sep 02 00:05:55 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Sun Sep 02 08:00:54 2007 +0000
@@ -683,6 +683,7 @@
 msim_incoming_im(MsimSession *session, MsimMessage *msg)
 {
 	gchar *username, *msg_msim_markup, *msg_purple_markup;
+	time_t time_received;
 
 	g_return_val_if_fail(MSIM_SESSION_VALID(session), FALSE);
 	g_return_val_if_fail(msg != NULL, FALSE);
@@ -696,8 +697,12 @@
 	msg_purple_markup = msim_markup_to_html(session, msg_msim_markup);
 	g_free(msg_msim_markup);
 
-	serv_got_im(session->gc, username, msg_purple_markup, 
-			PURPLE_MESSAGE_RECV, time(NULL));
+	time_received = msim_msg_get_integer(msg, "date");
+	if (!time_received) {
+		time_received = time(NULL);
+	}
+
+	serv_got_im(session->gc, username, msg_purple_markup, PURPLE_MESSAGE_RECV, time_received);
 
 	g_free(username);
 	g_free(msg_purple_markup);