]> git.mxchange.org Git - friendica.git/commitdiff
Issue 12285: Show sharing notification only once
authorMichael <heluecht@pirati.ca>
Sun, 11 Dec 2022 04:11:29 +0000 (04:11 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 11 Dec 2022 04:11:29 +0000 (04:11 +0000)
src/Model/Post/UserNotification.php

index b26fb292bc6b84d664a87689e2df1b2fc3ba4442..d872d5c41cbf95395aeeb0eb2281d22b7d93634f 100644 (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;