use 410 Gone for Twitter API

This commit is contained in:
Evan Prodromou 2009-07-16 01:01:45 -04:00
parent 3ebf817e36
commit a321651a13
1 changed files with 8 additions and 2 deletions

View File

@ -396,8 +396,14 @@ class TwitapistatusesAction extends TwitterapiAction
} else {
// XXX: Twitter just sets a 404 header and doens't bother
// to return an err msg
$this->clientError(_('No status with that ID found.'),
404, $apidata['content-type']);
$deleted = Deleted_notice::staticGet($notice_id);
if (!empty($deleted)) {
$this->clientError(_('Status deleted.'),
410, $apidata['content-type']);
} else {
$this->clientError(_('No status with that ID found.'),
404, $apidata['content-type']);
}
}
}