]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
change apitimelinehome to use InboxNoticeStream
authorEvan Prodromou <evan@status.net>
Thu, 7 Apr 2011 19:35:00 +0000 (15:35 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 7 Apr 2011 19:35:00 +0000 (15:35 -0400)
actions/apitimelinehome.php

index 96642cbfab6b476cb95c494eacef882c990e6ff9..3c18a5b0bf195d35f396c8551efa623f8055cfa0 100644 (file)
@@ -192,19 +192,12 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
     {
         $notices = array();
 
-        if (!empty($this->auth_user) && $this->auth_user->id == $this->user->id) {
-            $notice = $this->user->noticeInbox(
-                ($this->page-1) * $this->count,
-                $this->count, $this->since_id,
-                $this->max_id
-            );
-        } else {
-            $notice = $this->user->noticesWithFriends(
-                ($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);