forked from GNUsocial/gnu-social
Revert "Hide posts by silenced users"
This reverts commit d22fc7423ce2365e229fb41e0dae97f069ec2214.
This commit is contained in:
parent
04f71a42d3
commit
70f9d41c4c
@ -2381,22 +2381,6 @@ class Notice extends Managed_DataObject
|
|||||||
$scope = self::defaultScope();
|
$scope = self::defaultScope();
|
||||||
}
|
}
|
||||||
|
|
||||||
$author = $this->getProfile();
|
|
||||||
|
|
||||||
// Author is always in scope
|
|
||||||
|
|
||||||
if ($author->id == $profile->id) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the author is silenced, only show to
|
|
||||||
// folks who can un-silence; note ignores scope
|
|
||||||
|
|
||||||
if ($author->hasRole(Profile_role::SILENCED) &&
|
|
||||||
(empty($profile) || !$profile->hasRight(Right::SILENCEUSER))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If there's no scope, anyone (even anon) is in scope.
|
// If there's no scope, anyone (even anon) is in scope.
|
||||||
|
|
||||||
if ($scope == 0) {
|
if ($scope == 0) {
|
||||||
@ -2409,6 +2393,12 @@ class Notice extends Managed_DataObject
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author is always in scope
|
||||||
|
|
||||||
|
if ($this->profile_id == $profile->id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Only for users on this site
|
// Only for users on this site
|
||||||
|
|
||||||
if ($scope & Notice::SITE_SCOPE) {
|
if ($scope & Notice::SITE_SCOPE) {
|
||||||
@ -2455,6 +2445,7 @@ class Notice extends Managed_DataObject
|
|||||||
// Only for followers of the author
|
// Only for followers of the author
|
||||||
|
|
||||||
if ($scope & Notice::FOLLOWER_SCOPE) {
|
if ($scope & Notice::FOLLOWER_SCOPE) {
|
||||||
|
$author = $this->getProfile();
|
||||||
if (!Subscription::exists($profile, $author)) {
|
if (!Subscription::exists($profile, $author)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user