Skip to content

Commit

Permalink
Fix receiving alerts on replies from blocked users
Browse files Browse the repository at this point in the history
  • Loading branch information
RedEnchilada committed Oct 8, 2014
1 parent 057a4e8 commit b14eae5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions classes/Notice.php
Expand Up @@ -1039,14 +1039,15 @@ function whoGets($groups=null, $recipients=null)
$originalProfile = $original->getProfile();
}
}
foreach ($ni as $id => $source) {
$user = User::staticGet('id', $id);
if (empty($user) || $user->hasBlocked($profile) ||
($originalProfile && $user->hasBlocked($originalProfile))) {
unset($ni[$id]);
}
}
}

foreach ($ni as $id => $source) {
$user = User::staticGet('id', $id);
if (empty($user) || $user->hasBlocked($profile) ||
($originalProfile && $user->hasBlocked($originalProfile))) {
unset($ni[$id]);
}
}

// Give plugins a chance to filter out...
Event::handle('EndNoticeWhoGets', array($this, &$ni));
Expand Down Expand Up @@ -1320,7 +1321,7 @@ function saveReplies()
$original = $this->getOriginal();
if (!empty($original)) { // that'd be weird
$author = $original->getProfile();
if (!empty($author)) {
if (!empty($author) && !$author->hasBlocked($sender)) {
$this->saveReply($author->id);
$replied[$author->id] = 1;
self::blow('reply:stream:%d', $author->id);
Expand Down

0 comments on commit b14eae5

Please sign in to comment.