Merge pull request #6884 from annando/issue-6521
Issue 6521: Don't show notifications on posts that the user deleted
This commit is contained in:
commit
b0a0d4af6b
|
@ -784,7 +784,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") {
|
||||||
'author-link', 'author-name', 'author-avatar', 'author-id',
|
'author-link', 'author-name', 'author-avatar', 'author-id',
|
||||||
'guid', 'parent-uri', 'uri', 'contact-id', 'network'];
|
'guid', 'parent-uri', 'uri', 'contact-id', 'network'];
|
||||||
$condition = ['id' => $itemid, 'gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT]];
|
$condition = ['id' => $itemid, 'gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT]];
|
||||||
$item = Item::selectFirst($fields, $condition);
|
$item = Item::selectFirstForUser($uid, $fields, $condition);
|
||||||
if (!DBA::isResult($item) || in_array($item['author-id'], $contacts)) {
|
if (!DBA::isResult($item) || in_array($item['author-id'], $contacts)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue