From: Evan Prodromou Date: Thu, 7 Apr 2011 19:28:09 +0000 (-0400) Subject: use inboxnoticestream in API X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=328373e29ce1429c7f7482c52d04ebe8bb70a00a;p=quix0rs-gnu-social.git use inboxnoticestream in API --- diff --git a/actions/apitimelinefriends.php b/actions/apitimelinefriends.php index 00eb4de502..279265a30e 100644 --- a/actions/apitimelinefriends.php +++ b/actions/apitimelinefriends.php @@ -289,15 +289,12 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction { $notices = array(); - if (!empty($this->auth_user) && $this->auth_user->id == $this->user->id) { - $notice = $this->user->ownFriendsTimeline(($this->page-1) * $this->count, - $this->count, $this->since_id, - $this->max_id); - } else { - $notice = $this->user->friendsTimeline(($this->page-1) * $this->count, - $this->count, $this->since_id, - $this->max_id); - } + $stream = new InboxNoticeStream($this->user); + + $notice = $stream->getNotices(($this->page-1) * $this->count, + $this->count, + $this->since_id, + $this->max_id); while ($notice->fetch()) { $notices[] = clone($notice);