1
1
Fork 0

Merge pull request #12384 from annando/issue-12285

Issue 12285: Show sharing notification only once
This commit is contained in:
Hypolite Petovan 2022-12-10 23:54:39 -05:00 committed by GitHub
commit 84fc8973e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -440,6 +440,12 @@ class UserNotification
}
}
// Only check on posts by the user itself
$cdata = Contact::getPublicAndUserContactID($item['contact-id'], $item['uid']);
if (empty($cdata['user']) || ($item['author-id'] != $cdata['public'])) {
return false;
}
// Check if the contact posted or shared something directly
if (DBA::exists('contact', ['id' => $item['contact-id'], 'notify_new_posts' => true])) {
return true;