if (common_config('memcached', 'enabled')) {
$notice->blowCaches();
}
-
+
+ $notice->addToInboxes();
return $notice;
}
return $wrapper;
}
-
+
function publicStream($offset=0, $limit=20, $since_id=0, $before_id=0) {
$needAnd = FALSE;
'public',
$offset, $limit);
}
+
+ function addToInboxes() {
+
+ $inbox = new Notice_inbox();
+
+ $inbox->query('INSERT INTO notice_inbox (user_id, notice_id) ' .
+ 'SELECT user.id, ' . $this->id . ' ' .
+ 'FROM user JOIN subscription ON user.id = subscription.subscriber ' .
+ 'WHERE subscription.subscribed = ' . $this->profile_id);
+
+ return;
+ }
}
+