summaryrefslogtreecommitdiff
path: root/actions/apitimelineuser.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-16 09:25:09 -0800
committerBrion Vibber <brion@pobox.com>2010-02-16 09:25:09 -0800
commitd5cbfe8071d56438cfa168dc3db56a959317eae0 (patch)
treec00ca6c3e0d1bd2fb9b05a515c337b6afce3a070 /actions/apitimelineuser.php
parentd4f6235d7b8a40bd1b51370e7eb405cdb14e61fb (diff)
parent81b6b58e33f55054b7e5dd546f06dbdb5696ed92 (diff)
Merge branch 'testing' into 0.9.x
Conflicts: lib/iomaster.php
Diffstat (limited to 'actions/apitimelineuser.php')
-rw-r--r--actions/apitimelineuser.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php
index d20bb0d20..24752e45f 100644
--- a/actions/apitimelineuser.php
+++ b/actions/apitimelineuser.php
@@ -148,7 +148,19 @@ class ApiTimelineUserAction extends ApiBareAuthAction
header('Content-Type: application/atom+xml; charset=utf-8');
- $atom = new AtomNoticeFeed();
+ // If this was called using an integer ID, i.e.: using the canonical
+ // URL for this user's feed, then pass the User object into the feed,
+ // so the OStatus plugin, and possibly other plugins, can access it.
+ // Feels sorta hacky. -- Z
+
+ $atom = null;
+ $id = $this->arg('id');
+
+ if (strval(intval($id)) === strval($id)) {
+ $atom = new AtomUserNoticeFeed($this->user);
+ } else {
+ $atom = new AtomUserNoticeFeed();
+ }
$atom->setId($id);
$atom->setTitle($title);