- if ($scope & Notice::FOLLOWER_SCOPE) {
- $author = $this->getProfile();
- if (!Subscription::exists($profile, $author)) {
- return false;
+ if (common_config('notice', 'hidespam')) {
+
+ try {
+ $author = $this->getProfile();
+ } catch(Exception $e) {
+ // If we can't get an author, keep it hidden.
+ // XXX: technically not spam, but, whatever.
+ return true;
+ }
+
+ if ($author->hasRole(Profile_role::SILENCED)) {
+ if (empty($profile) || (($profile->id !== $author->id) && (!$profile->hasRight(Right::REVIEWSPAM)))) {
+ return true;
+ }