# HG changeset patch # User Jeffrey Connelly # Date 1188700032 0 # Node ID 94a2a1ccd6ece41ba72c702541f9708e0a0d1f2c # Parent 4691b5f80ac8808521438243a96b000eef1952a3 Use the sent timestamp in incoming instant messages instead of the current time, if available. This means that offline messages sent in the past now show correctly that they were. Closes #2906. diff -r 4691b5f80ac8 -r 94a2a1ccd6ec libpurple/protocols/myspace/myspace.c --- a/libpurple/protocols/myspace/myspace.c Sat Sep 01 23:09:41 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Sun Sep 02 02:27:12 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);