fix replying, again.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 27 Jul 2010 00:15:55 +0000 (20:15 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 27 Jul 2010 00:20:47 +0000 (20:20 -0400)
framework/Service_Twitter/lib/Horde/Service/Twitter/Statuses.php
horde/services/twitter.php

index 8affa0a..dbf4acb 100644 (file)
@@ -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.
      *   <pre>
      *     in_reply_to_status_id  - the status id this tweet is in response to.
index 14c2fb4..9723f62 100644 (file)
@@ -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;