Rever item reshare handling, fixed database

2022.09-rc
Michael 2021-02-15 10:29:58 +00:00
rodzic 2b76ff61ad
commit 2b17e36a67
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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;
}

Wyświetl plik

@ -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();