libpurple/server.c

branch
soc.2013.gobjectification.plugins
changeset 37153
c0eccc6696da
parent 37148
50f361d39a1e
parent 36108
69b4fce85ffa
child 37162
3336df05de5b
--- a/libpurple/server.c	Thu Jun 12 22:21:37 2014 +0530
+++ b/libpurple/server.c	Sun Jun 15 03:46:35 2014 +0530
@@ -875,7 +875,12 @@
 	purple_signal_emit(purple_conversations_get_handle(), "received-chat-msg", purple_connection_get_account(g),
 					 who, message, chat, flags);
 
-	pmsg = purple_message_new_incoming(who, message, flags, mtime);
+	if (flags & PURPLE_MESSAGE_RECV)
+		pmsg = purple_message_new_incoming(who, message, flags, mtime);
+	else {
+		pmsg = purple_message_new_outgoing(who, message, flags);
+		purple_message_set_time(pmsg, mtime);
+	}
 	purple_conversation_write_message(PURPLE_CONVERSATION(chat), pmsg);
 
 	g_free(angel);

mercurial