r7364 - dumbhippo/trunk/server/src/com/dumbhippo/server/impl



Author: marinaz
Date: 2008-03-13 13:51:17 -0500 (Thu, 13 Mar 2008)
New Revision: 7364

Modified:
   dumbhippo/trunk/server/src/com/dumbhippo/server/impl/StackerBean.java
Log:
Publish Facebook user actions about new Twitter and MySpace blog entries,
even if they happen sooner than 6 hours after the previous entry. 

Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/impl/StackerBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/impl/StackerBean.java	2008-03-13 18:24:28 UTC (rev 7363)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/impl/StackerBean.java	2008-03-13 18:51:17 UTC (rev 7364)
@@ -790,7 +790,13 @@
 					    	// The time interval can be different for different block types or stack reasons.
 					    	// The downside of this logic is that if someone plays music every 5 hours or comments on
 					    	// a block every 5 hours, we'll never create a new update about it after the first one.
-					    	if (previousParticipationFinal.getSecond() == null || 
+					    	//
+					    	// Exclude Twitter and MySpace blog updates from such logic, since even though we reuse the
+					    	// same block for them, they should not happen too often and each one of them is interesting.
+					    	// The exclusion only applies to BLOCK_UPDATE stack reason, and not others such as CHAT_MESSAGE. 
+					    	// (Though we don't have chatting on Twitter blocks anyway.)
+					    	if (((block.getBlockType() == BlockType.TWITTER_PERSON || block.getBlockType() == BlockType.MYSPACE_PERSON) && reason.equals(StackReason.BLOCK_UPDATE)) ||	
+					    		previousParticipationFinal.getSecond() == null || 
 					            !previousParticipationFinal.getSecond().equals(reason) ||
 								previousParticipationFinal.getFirst() < (new Date().getTime()) - 6 * 60 * 60 * 1000) {
 					    		



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]