From 8333ac33c8fd5554c0ae61f45ddfc7c5b03f1108 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 31 Mar 2011 12:56:53 -0400 Subject: [PATCH] if user has private stream flag, set that scope --- classes/Notice.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/classes/Notice.php b/classes/Notice.php index 069d7d64ff..1b21819fbd 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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 -- 2.39.5