incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vdic...@apache.org
Subject svn commit: r736291 - /incubator/esme/trunk/server/src/main/scala/us/esme/external/RssFeed.scala
Date Wed, 21 Jan 2009 11:44:59 GMT
Author: vdichev
Date: Wed Jan 21 03:44:59 2009
New Revision: 736291

URL: http://svn.apache.org/viewvc?rev=736291&view=rev
Log:
Fixed bug where new items in an RSS feed were discarded

Modified:
    incubator/esme/trunk/server/src/main/scala/us/esme/external/RssFeed.scala

Modified: incubator/esme/trunk/server/src/main/scala/us/esme/external/RssFeed.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/us/esme/external/RssFeed.scala?rev=736291&r1=736290&r2=736291&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/us/esme/external/RssFeed.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/us/esme/external/RssFeed.scala Wed Jan 21 03:44:59
2009
@@ -68,10 +68,13 @@
   override def getLastSortedMessages(msgs: List[Msg], lastMessage: Option[Msg]): List[Msg]
= {
     lastMessage match {
       case Some(message: Msg) =>
-        msgs.reverse.takeWhile{ msg =>
-          // a hack to format text identically- difference in urls & trailing whitespace
-          Message.setTextAndTags(msg.text, Nil, Empty).get.getText !=
-          Message.setTextAndTags(message.text, Nil, Empty).get.getText
+        // a hack to format text identically- difference in urls & trailing whitespace
+        val lastMessageText = 
+          Message.create.setTextAndTags(message.text, Nil, Empty).
+            get.getText.trim
+        msgs.takeWhile{ msg =>
+          Message.create.setTextAndTags(msg.text, Nil, Empty).
+            get.getText.trim != lastMessageText
         }
       case None => msgs
     }



Mime
View raw message