1
1
Fork 0

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:
Tobias Diekershoff 2019-03-15 06:50:08 +01:00 committed by GitHub
commit b0a0d4af6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -784,7 +784,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") {
'author-link', 'author-name', 'author-avatar', 'author-id',
'guid', 'parent-uri', 'uri', 'contact-id', 'network'];
$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)) {
return false;
}