From 16daa87a392bc503ff7c07773618893f581dc982 Mon Sep 17 00:00:00 2001 From: Mike Cochrane Date: Wed, 30 Jul 2008 20:49:22 -0400 Subject: Resolve conflicts darcs-hash:20080731004922-533db-96d62078f226ffc18db71d222d1c47524ac1319d.gz --- actions/twitapistatuses.php | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'actions/twitapistatuses.php') diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php index b7d4c7e7e..b2bbb16f0 100644 --- a/actions/twitapistatuses.php +++ b/actions/twitapistatuses.php @@ -371,21 +371,19 @@ class TwitapistatusesAction extends TwitterapiAction { } function update($args, $apidata) { - + parent::handle($args); $user = $apidata['user']; - - $this->is_readonly(); - - - $notice = DB_DataObject::factory('notice'); - - $notice->profile_id = $user->id; # user id *is* profile id - $notice->created = DB_DataObject_Cast::dateTime(); - $notice->content = $this->trimmed('status'); - - if (!$notice->content) { + + $status = $this->trimmed('status'); + $source = $this->trimmed('source'); + + if (!$source) { + $source = 'api'; + } + + if (!$status) { // XXX: Note: In this case, Twitter simply returns '200 OK' // No error is given, but the status is not posted to the @@ -404,9 +402,6 @@ class TwitapistatusesAction extends TwitterapiAction { exit(); } - $notice->rendered = common_render_content($notice->content, $notice); - $notice->is_local = 1; - $notice = Notice::saveNew($user->id, $status, $source); if (is_string($notice)) { @@ -415,7 +410,7 @@ class TwitapistatusesAction extends TwitterapiAction { } common_broadcast_notice($notice); - + // FIXME: Bad Hack // I should be able to just sent this notice off for display, // but $notice->created does not contain a string at this -- cgit v1.2.3-54-g00ecf