summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-09 13:59:39 -0800
committerEvan Prodromou <evan@status.net>2010-01-09 13:59:39 -0800
commitd902de139cbce38a40525811fe117fdf17aec244 (patch)
treee993e80c8625d608b8886305a70606d21cf21f46 /plugins
parent9cfea6d051372cb1c7d177b2a0eb26f773821238 (diff)
change PuSH plugin to use whoGets()
Diffstat (limited to 'plugins')
-rw-r--r--plugins/PubSubHubBub/PubSubHubBubPlugin.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/PubSubHubBub/PubSubHubBubPlugin.php b/plugins/PubSubHubBub/PubSubHubBubPlugin.php
index d15a869cb..d9c047de8 100644
--- a/plugins/PubSubHubBub/PubSubHubBubPlugin.php
+++ b/plugins/PubSubHubBub/PubSubHubBubPlugin.php
@@ -95,14 +95,16 @@ class PubSubHubBubPlugin extends Plugin
}
//feed of each user that subscribes to the notice's author
- $notice_inbox = new Notice_inbox();
- $notice_inbox->notice_id = $notice->id;
- if ($notice_inbox->find()) {
- while ($notice_inbox->fetch()) {
- $user = User::staticGet('id',$notice_inbox->user_id);
- $feeds[]=common_local_url('ApiTimelineUser',array('id' => $user->nickname, 'format'=>'rss'));
- $feeds[]=common_local_url('ApiTimelineUser',array('id' => $user->nickname, 'format'=>'atom'));
+
+ $ni = $notice->whoGets();
+
+ foreach (array_keys($ni) as $user_id) {
+ $user = User::staticGet('id', $user_id);
+ if (empty($user)) {
+ continue;
}
+ $feeds[]=common_local_url('ApiTimelineUser',array('id' => $user->nickname, 'format'=>'rss'));
+ $feeds[]=common_local_url('ApiTimelineUser',array('id' => $user->nickname, 'format'=>'atom'));
}
//feed of user replied to