forked from GNUsocial/gnu-social
If there's an exception in notice distribution, continue
This commit is contained in:
parent
6aaee4e5fe
commit
6f424eb80f
@ -1031,9 +1031,15 @@ class Notice extends Managed_DataObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($ni as $id => $source) {
|
foreach ($ni as $id => $source) {
|
||||||
$user = User::staticGet('id', $id);
|
try {
|
||||||
if (empty($user) || $user->hasBlocked($profile) ||
|
$user = User::staticGet('id', $id);
|
||||||
($originalProfile && $user->hasBlocked($originalProfile))) {
|
if (empty($user) ||
|
||||||
|
$user->hasBlocked($profile) ||
|
||||||
|
($originalProfile && $user->hasBlocked($originalProfile))) {
|
||||||
|
unset($ni[$id]);
|
||||||
|
}
|
||||||
|
} catch (UserNoProfileException $e) {
|
||||||
|
// User doesn't have a profile; invalid; skip them.
|
||||||
unset($ni[$id]);
|
unset($ni[$id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user