diff options
author | Zach Copley <zach@status.net> | 2010-02-12 19:00:35 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-02-12 19:02:27 -0800 |
commit | f3a82e787c70e8cf749c79f22fe37ce6c9c9d4d3 (patch) | |
tree | e44584e632060d49f2ff325b4daf45c251f3dceb /actions/apitimelineuser.php | |
parent | d6f1df8b76259acfc0d0566e8bf3610172b27884 (diff) |
Add OStatus PuSH hub and Salmon links back into user and group feeds
Diffstat (limited to 'actions/apitimelineuser.php')
-rw-r--r-- | actions/apitimelineuser.php | 14 |
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); |