incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r953652 - /incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
Date Fri, 11 Jun 2010 10:46:34 GMT
Author: rhirsch
Date: Fri Jun 11 10:46:33 2010
New Revision: 953652

URL: http://svn.apache.org/viewvc?rev=953652&view=rev
Log:
[ESME-213] Twitter API is out-of-date and API calls don't always return the correct info
Fixed home_timeline

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

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala?rev=953652&r1=953651&r2=953652&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala Fri Jun
11 10:46:33 2010
@@ -213,13 +213,10 @@ abstract class TwitterAPI {
    
    /*     val statusList = 
       Mailbox.mostRecentMessagesFor(user.id, count.toInt);*/
-    val queryParams = List[QueryParam[Message]](
-      By(Message.author, user),
-      By(Message.pool, Empty),
-      MaxRows(getCount),
-      OrderBy(Message.id, Descending)) ++ getStart[Message]
-    val statusList = Message.findAll(queryParams: _*).map(msgData _)
-    Right(Map("statuses" -> ("status", statusList) ))
+    val statusList =
+        for ((msg, why, _) <- Mailbox.mostRecentMessagesFor(user.id, getCount))
+          yield { msgData(msg) }
+      Right(Map("statuses" -> ("status", statusList) ))
   }
         
   



Mime
View raw message