We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit e35d46b4 authored by Brion Vibber's avatar Brion Vibber

Fix for ticket #3010: blocks are now applied against the original poster of repeats.

Previously, if someone you subscribe to repeats a notice by someone you've blocked, you got the message and had to just roll your eyes.
Now blocks are checked against both the current notice's posting profile, and the poster of the original if it's a repeat.
parent 0a3c05fe
......@@ -819,9 +819,18 @@ class Notice extends Memcached_DataObject
// Exclude any deleted, non-local, or blocking recipients.
$profile = $this->getProfile();
$originalProfile = null;
if ($this->repeat_of) {
// Check blocks against the original notice's poster as well.
$original = Notice::staticGet('id', $this->repeat_of);
if ($original) {
$originalProfile = $original->getProfile();
foreach ($ni as $id => $source) {
$user = User::staticGet('id', $id);
if (empty($user) || $user->hasBlocked($profile)) {
if (empty($user) || $user->hasBlocked($profile) ||
($originalProfile && $user->hasBlocked($originalProfile))) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment