incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esjew...@apache.org
Subject svn commit: r925659 - /incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala
Date Sat, 20 Mar 2010 19:01:03 GMT
Author: esjewett
Date: Sat Mar 20 19:01:02 2010
New Revision: 925659

URL: http://svn.apache.org/viewvc?rev=925659&view=rev
Log:
[ESME-184] Stops putting non-messages into mailboxes and notifying listeners, which was pushing
real messages out of the user timeline

Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala?rev=925659&r1=925658&r2=925659&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala Sat Mar
20 19:01:02 2010
@@ -246,9 +246,11 @@ class UserActor extends LiftActor {
         mb.saveMe
         Stats incr "messagesDelivered"
 
-        _mailbox = ((msg.id.is, reason, false) :: _mailbox.toList).take(500).toArray
-
-        listeners.foreach(_ ! MessageReceived(msg, reason))
+        // Only add to mailbox and notify listeners if there is a real message involved
+        if(msg.id.is != -1) {
+          _mailbox = ((msg.id.is, reason, false) :: _mailbox.toList).take(500).toArray
+          listeners.foreach(_ ! MessageReceived(msg, reason)) 
+        }                               
             
         toDo.foreach {
           td =>
@@ -268,7 +270,8 @@ class UserActor extends LiftActor {
               Distributor !
               Distributor.AddMessageToMailbox(id, msg, ResendReason(userId))
 
-            case FetchFeed(_, _) => MessagePullActor ! MessagePullActor.Fetch(td.performId)
+            case FetchFeed(_, _) => 
+              MessagePullActor ! MessagePullActor.Fetch(td.performId)    
 
             case ScalaInterpret => logger.info("Scala interpreter is disabled!")
             /*if (msg.source.is != "scala")



Mime
View raw message