From 31782c98506d6879277950ccc023f21e033c6ec7 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 26 Jul 2010 20:15:55 -0400 Subject: [PATCH] fix replying, again. --- framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php | 4 ---- horde/services/twitter.php | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php b/framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php index 8affa0a8d..dbf4acb65 100644 --- a/framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php +++ b/framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php @@ -66,10 +66,6 @@ class Horde_Service_Twitter_Statuses * Update the current user's status. * * @param string $status The new status text. - * @param string $replyTo If specified, *and* the text of the status contains - * a mention of the author of the replied to status - * (i.e. `@username`) this update will be "in reply to" - * the specifed status message id. * @param array $params Any additional parameters. *
      *     in_reply_to_status_id  - the status id this tweet is in response to.
diff --git a/horde/services/twitter.php b/horde/services/twitter.php
index 14c2fb457..9723f6223 100644
--- a/horde/services/twitter.php
+++ b/horde/services/twitter.php
@@ -34,7 +34,12 @@ $action = Horde_Util::getPost('actionID');
 switch ($action) {
 
 case 'updateStatus':
-    $result = $twitter->statuses->update(Horde_Util::getPost('statusText'), Horde_Util::getPost('inReplyTo', ''));
+    if ($inreplyTo = Horde_Util::getPost('inReplyTo')) {
+        $params = array('in_reply_to_status_id', $inreplyTo);
+    } else {
+        $params = array();
+    }
+    $result = $twitter->statuses->update(Horde_Util::getPost('statusText'), $params);
     header('Content-Type: application/json');
     echo $result;
     exit;
-- 
2.11.0