From: Evan Prodromou Date: Thu, 31 Mar 2011 16:56:53 +0000 (-0400) Subject: if user has private stream flag, set that scope X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8333ac33c8fd5554c0ae61f45ddfc7c5b03f1108;p=quix0rs-gnu-social.git if user has private stream flag, set that scope --- 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