]> git.mxchange.org Git - friendica.git/commitdiff
Rever item reshare handling, fixed database
authorMichael <heluecht@pirati.ca>
Mon, 15 Feb 2021 10:29:58 +0000 (10:29 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 15 Feb 2021 10:29:58 +0000 (10:29 +0000)
src/Model/Item.php
src/Worker/ExpirePosts.php

index 397ea0b315abfce8982eb7667feaec3d18a27b65..8fc7ce1357485aac966a2faf7a064a281fd17e6c 100644 (file)
@@ -1146,7 +1146,7 @@ class Item
                }
 
                $cid = Contact::getIdForURL($author['url'], $item['uid']);
-               if (empty($cid) || (!Contact::isSharing($cid, $item['uid'] && in_array($author['network'], Protocol::FEDERATED)))) {
+               if (empty($cid) || !Contact::isSharing($cid, $item['uid'])) {
                        Logger::info('The resharer is not a following contact: quit', ['resharer' => $author['url'], 'uid' => $item['uid'], 'cid' => $cid]);
                        return;
                }
index 33c8e542ab63fa80e354176d4f68c6eb97a808f4..8d50c5d9d5494366ba4de6c83259aa9c53f458c1 100644 (file)
@@ -61,7 +61,7 @@ class ExpirePosts
                                                AND NOT `uri-id` IN (SELECT `parent-uri-id` FROM `post-user`
                                                        WHERE (`origin` OR `event-id` != 0 OR `post-type` = ?) AND `parent-uri-id` = `post-thread`.`uri-id`)
                                                AND NOT `uri-id` IN (SELECT `uri-id` FROM `post-content`
-                                                       WHERE `resource-id` != 0 AND `uri-id` = `post-thread`.`uri-id`)
+                                                       WHERE `resource-id` != 0 AND `uri-id` = `post-thread`.`uri-id`))
                                        ORDER BY `id` LIMIT ?", $expire_days, Item::PT_PERSONAL_NOTE, $limit);
 
                                $rows = DBA::affectedRows();