- if ($this->streamProfile->hasRole(Profile_role::SILENCED) &&
- (empty($this->userProfile) || ($this->userProfile->id !== $this->streamProfile->id) && !$this->userProfile->hasRight(Right::REVIEWSPAM))) {
+ // if this is a silenced user
+ if ($this->target->hasRole(Profile_role::SILENCED)
+ // and we are either not logged in
+ && (!$this->scoped instanceof Profile
+ // or if we are, we are not logged in as the target, and we don't have right to review spam
+ || (!$this->scoped->sameAs($this->target) && !$this->scoped->hasRight(Right::REVIEWSPAM))
+ )) {