incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r890704 - /incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala
Date Tue, 15 Dec 2009 09:24:30 GMT
Author: rhirsch
Date: Tue Dec 15 09:24:30 2009
New Revision: 890704

URL: http://svn.apache.org/viewvc?rev=890704&view=rev
Log:
[ESME-144] API2 message streaming method displays RegularReason type messages, which should
not be displayed to the user
Patch from Ethan Jewett applied


Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala?rev=890704&r1=890703&r2=890704&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala Tue Dec 15 09:24:30
2009
@@ -535,7 +535,7 @@
   	S.param("user").flatMap(User.findFromWeb) or
   	User.currentUser 
 
-  def createTag(in: NodeSeq) = <api_response>{in}</api_response>
+  def createTag(in: NodeSeq) = <api>{in}</api>
   
   private def buildActor(userId: Long): RestActor = {
     val ret = new RestActor
@@ -562,12 +562,16 @@
         Distributor ! Distributor.Unlisten(userId, this)
           
       case UserActor.MessageReceived(msg, reason) =>
-        msgs = (msg, reason) :: msgs
-        listener.foreach {
-          who =>
-            who.satisfy(msgs)
-            listener = Empty
-            msgs = Nil
+        reason match {
+          case r: RegularReason => {}
+          case _ =>
+            msgs = (msg, reason) :: msgs                          
+            listener.foreach {
+              who =>
+                who.satisfy(msgs)
+                listener = Empty
+                msgs = Nil
+            }     
         }
       
       case ReleaseListener =>



Mime
View raw message