- // @TODO: Replace with parameter from router
- $nickname = $a->argv[1];
- header("Content-type: application/atom+xml; charset=utf-8");
- echo OStatus::feed($nickname, $last_update, 10, $type, $nocache, true);
- exit();
+ $feed = ProtocolFeed::atom($this->parameters['nickname'], $last_update, 10, $type, $nocache, true);
+ if (empty($feed)) {
+ throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
+ }
+
+ System::httpExit($feed, Response::TYPE_ATOM);