]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use whoGets() for realtime plugin
authorEvan Prodromou <evan@status.net>
Sat, 9 Jan 2010 21:56:54 +0000 (13:56 -0800)
committerEvan Prodromou <evan@status.net>
Sat, 9 Jan 2010 21:56:54 +0000 (13:56 -0800)
plugins/Realtime/RealtimePlugin.php

index 21e465b53d0fb93f454aa6c4efcae44ccf682e1b..89640f5beb25c7e41db6c4a3dceeb2569fa326cb 100644 (file)
@@ -154,14 +154,11 @@ class RealtimePlugin extends Plugin
         // Add to inbox timelines
         // XXX: do a join
 
-        $inbox = new Notice_inbox();
-        $inbox->notice_id = $notice->id;
+        $ni = $notice->whoGets();
 
-        if ($inbox->find()) {
-            while ($inbox->fetch()) {
-                $user = User::staticGet('id', $inbox->user_id);
-                $paths[] = array('all', $user->nickname);
-            }
+        foreach (array_keys($ni) as $user_id) {
+            $user = User::staticGet('id', $user_id);
+            $paths[] = array('all', $user->nickname);
         }
 
         // Add to the replies timeline