summaryrefslogtreecommitdiff
path: root/actions/twitapistatuses.php
diff options
context:
space:
mode:
authorMike Cochrane <mikec@mikenz.geek.nz>2008-07-30 20:49:22 -0400
committerMike Cochrane <mikec@mikenz.geek.nz>2008-07-30 20:49:22 -0400
commit16daa87a392bc503ff7c07773618893f581dc982 (patch)
treef44abb6a381e74800ccc048f2e7b967a7b1b7a8d /actions/twitapistatuses.php
parent9d89e7b4ac605f89a0769e62dd6ea736f59e0be4 (diff)
Resolve conflicts
darcs-hash:20080731004922-533db-96d62078f226ffc18db71d222d1c47524ac1319d.gz
Diffstat (limited to 'actions/twitapistatuses.php')
-rw-r--r--actions/twitapistatuses.php27
1 files changed, 11 insertions, 16 deletions
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