diff --git a/mod/profile.php b/mod/profile.php
index 9b609f885..843f06de3 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -64,7 +64,9 @@ function profile_init(App $a)
}
$a->page['htmlhead'] .= '' . "\r\n";
- $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . ($a->path ? '/' . $a->path : ''));
$a->page['htmlhead'] .= '' . "\r\n";
header('Link: <' . System::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
diff --git a/src/Module/Feed.php b/src/Module/Feed.php
new file mode 100644
index 000000000..678e77e83
--- /dev/null
+++ b/src/Module/Feed.php
@@ -0,0 +1,59 @@
+ posts
+ * - /feed/[nickname]/posts => posts
+ * - /feed/[nickname]/comments => comments
+ * - /feed/[nickname]/replies => comments
+ * - /feed/[nickname]/activity => activity
+ *
+ * The nocache GET parameter is provided mainly for debug purposes, requires auth
+ *
+ * @brief Provides public Atom feeds
+ *
+ * @author Hypolite Petovan
+ */
+class Feed extends BaseModule
+{
+ public static function content()
+ {
+ $a = self::getApp();
+
+ $last_update = x($_GET, 'last_update') ? $_GET['last_update'] : '';
+ $nocache = x($_GET, 'nocache') && local_user();
+
+ if ($a->argc < 2) {
+ http_status_exit(400);
+ }
+
+ $type = null;
+ if ($a->argc > 2) {
+ $type = $a->argv[2];
+ }
+
+ switch ($type) {
+ case 'posts':
+ case 'comments':
+ case 'activity':
+ break;
+ case 'replies':
+ $type = 'comments';
+ break;
+ default:
+ $type = 'posts';
+ }
+
+ $nickname = $a->argv[1];
+ header("Content-type: application/atom+xml");
+ echo OStatus::feed($nickname, $last_update, 10, $type, $nocache);
+ killme();
+ }
+}