$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);
}
}
}
- // 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;
}
}
return $this->getUser()->shortenLinks($text, $always);
}
+ public function isPrivateStream()
+ {
+ // We only know of public remote users as of yet...
+ if (!$this->isLocal()) {
+ return false;
+ }
+ return $this->getUser()->private_stream ? true : false;
+ }
+
public function delPref($namespace, $topic) {
return Profile_prefs::setData($this, $namespace, $topic, null);
}
return $act;
}
+ public function isPrivateStream()
+ {
+ return $this->getProfile()->isPrivateStream();
+ }
+
public function delPref($namespace, $topic)
{
return $this->getProfile()->delPref($namespace, $topic);