soc.2009.transport: a77cf3f0: Don't send delay in messages if they are...

hanzz at soc.pidgin.im hanzz at soc.pidgin.im
Thu Jul 16 04:25:35 EDT 2009


-----------------------------------------------------------------
Revision: a77cf3f0b5ab59bc839ed55ba586fa8acc7cf0b1
Ancestor: a69d250f740814e5bda7994de2f3f183ab7390cc
Author: hanzz at soc.pidgin.im
Date: 2009-07-16T08:15:21
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/a77cf3f0b5ab59bc839ed55ba586fa8acc7cf0b1

Modified files:
        user.cpp

ChangeLog: 

Don't send delay in messages if they are older then 1 year

-------------- next part --------------
============================================================
--- user.cpp	b34c080da2e165171ac86b082896df6970d73733
+++ user.cpp	c255dc15b77825f57fdd1fb5aa6fb0986b547abe
@@ -598,7 +598,7 @@ void User::purpleConversationWriteIM(Pur
 	}
 	
 	// Delayed messages, we have to count with some delay
-	if (int(time(NULL))-10>int(mtime)) {
+	if ((unsigned long) time(NULL)-10 > (unsigned long) mtime && (unsigned long) time(NULL) - 31536000 > (unsigned long) mtime) {
 		char buf[80];
 		strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%SZ", gmtime(&mtime));
 		std::string timestamp(buf);


More information about the Commits mailing list