]> git.mxchange.org Git - friendica.git/commitdiff
Issue 9051: Only change the owner of posts reshared by forums
authorMichael <heluecht@pirati.ca>
Sun, 23 Aug 2020 08:39:56 +0000 (08:39 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 23 Aug 2020 08:39:56 +0000 (08:39 +0000)
src/Model/Item.php

index ccccc592e6b25515ed66ae4bdb8b267bdf8729fc..4a73a87a207c39dde1856ad338882d466ef8fadd 100644 (file)
@@ -1994,16 +1994,12 @@ class Item
        }
 
        /**
-        * Change the owner of a parent item if it had been shared by a forum or a user contact
+        * Change the owner of a parent item if it had been shared by a forum
         *
         * (public) forum posts in the new format consist of the regular post by the author
         * followed by an announce message sent from the forum account.
         * Changing the owner helps in grouping forum posts.
         *
-        * For other reshared posts this function changes the owner of that post
-        * if the author is not a user contact but the post had been shared by one.
-        * This helps in detecting why this post appeared in the timeline.
-        *
         * @param array $item
         * @return void
         */
@@ -2022,13 +2018,8 @@ class Item
                        return;
                }
 
-               if (($author['contact-type'] != Contact::TYPE_COMMUNITY) && (($parent['owner-id'] != $parent['author-id']) || ($item['uid'] == 0))) {
-                       logger::info('The resharer is no forum and the parent is reshared or not a personal post: quit', ['resharer' => $item['author-id'], 'owner' => $parent['owner-id'], 'author' => $parent['author-id'], 'uid' => $item['uid']]);
-                       return;
-               }
-
-               if (($author['contact-type'] != Contact::TYPE_COMMUNITY) && (Contact::isSharing($parent['author-link'], $item['uid']) || $item['origin'])) {
-                       logger::info('The parent author is a following contact: quit', ['author' => $parent['author-link'], 'uid' => $item['uid']]);
+               if ($author['contact-type'] != Contact::TYPE_COMMUNITY) {
+                       logger::info('The resharer is no forum: quit', ['resharer' => $item['author-id'], 'owner' => $parent['owner-id'], 'author' => $parent['author-id'], 'uid' => $item['uid']]);
                        return;
                }