]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinefavorites.php
re-enable invite button and popular notice section on home stream
[quix0rs-gnu-social.git] / actions / apitimelinefavorites.php
index c952c4623870e91d882fc68d8f3721b14aeb4cc5..2c962b450adfef629296745d7825c7c68e181429 100644 (file)
@@ -169,8 +169,16 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
         case 'json':
             $this->showJsonTimeline($this->notices);
             break;
+        case 'as':
+            header('Content-Type: application/json; charset=utf-8');
+            $doc = new ActivityStreamJSONDocument($this->auth_user);
+            $doc->setTitle($title);
+            $doc->addLink($link,'alternate', 'text/html');
+            $doc->addItemsFromNotices($this->notices);
+            $this->raw($doc->asString());
+            break;
         default:
-            // TRANS: Client error displayed when trying to handle an unknown API method.
+            // TRANS: Client error displayed when coming across a non-supported API method.
             $this->clientError(_('API method not found.'), $code = 404);
             break;
         }