X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FNotice.php;h=c631c1fcc6768dd690bb449c8115096c1806f644;hb=a1dbe2325c0b9a14c01a2e35ee81170a80f57130;hp=81a4d8d2e5e972d9001016bf1c3afcafd3293959;hpb=060dbe1b567ef2efd34a514199962033adac7c79;p=quix0rs-gnu-social.git diff --git a/classes/Notice.php b/classes/Notice.php index 81a4d8d2e5..c631c1fcc6 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -2676,7 +2676,7 @@ class Notice extends Managed_DataObject $scope = self::defaultScope(); } - if ($scope == 0) { // Not scoping, so it is public. + if ($scope == 0 && !$this->getProfile()->isPrivateStream()) { // Not scoping, so it is public. return !$this->isHiddenSpam($profile); } @@ -2727,18 +2727,9 @@ class Notice extends Managed_DataObject } } - // Only for followers of the author - $author = null; + if ($scope & Notice::FOLLOWER_SCOPE || $this->getProfile()->isPrivateStream()) { - if ($scope & Notice::FOLLOWER_SCOPE) { - - try { - $author = $this->getProfile(); - } catch (Exception $e) { - return false; - } - - if (!Subscription::exists($profile, $author)) { + if (!Subscription::exists($profile, $this->getProfile())) { return false; } }