]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinementions.php
Merge branch 'master' into 0.9.x
[quix0rs-gnu-social.git] / actions / apitimelinementions.php
index a9b6d0b3df14c4f8c0d24ed8f11719ea9771ed08..2857bd41ea3dc3e4933ed8170d4a3a6e3e7b28f0 100644 (file)
@@ -169,6 +169,14 @@ class ApiTimelineMentionsAction 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.
             $this->clientError(_('API method not found.'), $code = 404);