libpurple/conversation.c

branch
release-2.x.y
changeset 35252
852014ae74a0
parent 31937
04974fca1329
child 35265
77664079d0f0
child 38082
63975292a852
--- a/libpurple/conversation.c	Thu Jan 16 13:02:42 2014 +0100
+++ b/libpurple/conversation.c	Sat Jan 18 09:01:20 2014 -0800
@@ -1551,6 +1551,14 @@
 	if (purple_conv_chat_is_user_ignored(chat, who))
 		return;
 
+	if (mtime < 0) {
+		purple_debug_error("conversation",
+				"purple_conv_chat_write ignoring negative timestamp\n");
+		/* TODO: Would be more appropriate to use a value that indicates
+		   that the timestamp is unknown, and surface that in the UI. */
+		mtime = time(NULL);
+	}
+
 	if (!(flags & PURPLE_MESSAGE_WHISPER)) {
 		const char *str;
 

mercurial