]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use 410 Gone for Twitter API
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 16 Jul 2009 05:01:45 +0000 (01:01 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 10:05:04 +0000 (06:05 -0400)
actions/twitapistatuses.php

index c9943698dc2bc06510c2d5bafdf506e7e6b6ba43..e3d366ecc8dddf7f4914faafaa935d1cbfeeea86 100644 (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']);
+            }
         }
     }