]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
Qvitter Update
[quix0rs-gnu-social.git] / classes / Notice.php
index 81a4d8d2e5e972d9001016bf1c3afcafd3293959..c631c1fcc6768dd690bb449c8115096c1806f644 100644 (file)
@@ -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;
             }
         }