- default:
- $this->clientError(
- // TRANS: Client error displayed when trying to handle an unknown API method.
- _('API method not found.'),
- 404,
- $this->format
- );
+ case 'as':
+ header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
+ $doc = new ActivityStreamJSONDocument($this->auth_user);
+ $doc->setTitle($atom->title);
+ $doc->addLink($link, 'alternate', 'text/html');
+ $doc->addItemsFromNotices($this->notices);
+ $this->raw($doc->asString());