]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use inboxnoticestream in API
authorEvan Prodromou <evan@status.net>
Thu, 7 Apr 2011 19:28:09 +0000 (15:28 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 7 Apr 2011 19:28:09 +0000 (15:28 -0400)
actions/apitimelinefriends.php

index 00eb4de502cba10425b3bc5ccc78d981bb0e078a..279265a30ee55a94e30daaf41ba06baea8822d3f 100644 (file)
@@ -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);