if user has private stream flag, set that scope

This commit is contained in:
Evan Prodromou 2011-03-31 12:56:53 -04:00
parent 5afa503364
commit 8333ac33c8
1 changed files with 12 additions and 0 deletions

View File

@ -420,6 +420,18 @@ class Notice extends Memcached_DataObject
$notice->scope = $scope;
}
// For private streams
$user = $profile->getUser();
if (!empty($user)) {
if ($user->private_stream &&
($notice->scope == Notice::PUBLIC_SCOPE ||
$notice->scope == Notice::SITE_SCOPE)) {
$notice->scope |= Notice::FOLLOWER_SCOPE;
}
}
if (Event::handle('StartNoticeSave', array(&$notice))) {
// XXX: some of these functions write to the DB