Commit 20396ce8 authored by Evan Prodromou's avatar Evan Prodromou

ActivityStreamJSONDocument served as application/stream+json

parent fadc4df0
......@@ -170,7 +170,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link,'alternate', 'text/html');
......
......@@ -266,7 +266,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link,'alternate', 'text/html');
......
......@@ -135,7 +135,7 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($atom->title);
$doc->addLink($link, 'alternate', 'text/html');
......
......@@ -169,7 +169,7 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');
......
......@@ -170,7 +170,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');
......
......@@ -235,7 +235,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');
......
......@@ -138,7 +138,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');
......
......@@ -137,7 +137,7 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
$this->raw($atom->getString());
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');
......
......@@ -153,7 +153,7 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');
......
......@@ -202,7 +202,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($atom->title);
$doc->addLink($link, 'alternate', 'text/html');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment