You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@esme.apache.org by vd...@apache.org on 2009/02/18 21:51:43 UTC
svn commit: r745644 -
/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
Author: vdichev
Date: Wed Feb 18 20:51:42 2009
New Revision: 745644
URL: http://svn.apache.org/viewvc?rev=745644&view=rev
Log:
ESME-31 fix bug of missing or duplicate status messages after posting.
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=745644&r1=745643&r2=745644&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 Wed Feb 18 20:51:42 2009
@@ -178,21 +178,13 @@
def update(params: HasParams, req: Req): Box[TwitterResponse] = {
for (user <- calcUser(req) ?~ "User not found";
- msg <- req.param("status") ?~ "Message not included")
+ text <- req.param("status") ?~ "Message not included";
+ msg <- Message.create.author(user.id.is).when(millis).
+ source(req.param("source") openOr "twitterapi").
+ setTextAndTags(text, Nil, None))
yield {
- val from: String = req.param("source") openOr "twitterapi"
-
- Distributor !
- Distributor.UserCreatedMessage(user.id.is, msg, Nil,
- millis,
- Empty,
- from,
- req.param("replyto").map(toLong))
- Right(Map("status" ->
- msgData(Message.create.author(user.id.is).when(millis).
- source(from).
- setTextAndTags(msg, Nil, None).get)
- ))
+ Distributor ! Distributor.AddMessageToMailbox(user.id.is, msg.saveMe, NoReason)
+ Right(Map("status" -> msgData(msg)))
}
}