From: Michael Date: Sun, 11 Dec 2022 04:11:29 +0000 (+0000) Subject: Issue 12285: Show sharing notification only once X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5e176b52a548fac55fbb260ebd8caff002399b5d;p=friendica.git Issue 12285: Show sharing notification only once --- diff --git a/src/Model/Post/UserNotification.php b/src/Model/Post/UserNotification.php index b26fb292bc..d872d5c41c 100644 --- a/src/Model/Post/UserNotification.php +++ b/src/Model/Post/UserNotification.php @@ -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;