diff --git a/database.sql b/database.sql index 1a7c0f373..8fa20be52 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2022.12-dev (Giant Rhubarb) --- DB_UPDATE_VERSION 1490 +-- DB_UPDATE_VERSION 1491 -- ------------------------------------------ diff --git a/src/Model/Item.php b/src/Model/Item.php index 48c578e85..0390730fd 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2358,8 +2358,8 @@ class Item $result = self::insert($datarray2); Logger::info('remote-self post original item', ['contact' => $contact['url'], 'result'=> $result, 'item' => $datarray2]); } else { - $datarray["app"] = "Feed"; - $result = true; + Logger::info('No valid mirroring option', ['uid' => $contact['uid'], 'id' => $contact['id'], 'network' => $contact['network'], 'remote_self' => $contact['remote_self']]); + return false; } return (bool)$result; diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 53289addf..942f2237d 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -55,7 +55,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1490); + define('DB_UPDATE_VERSION', 1491); } return [ diff --git a/update.php b/update.php index c7e2428af..2ee753ead 100644 --- a/update.php +++ b/update.php @@ -1121,3 +1121,9 @@ function update_1481() DBA::e("UPDATE `post-collection` INNER JOIN `post` ON `post`.`uri-id` = `post-collection`.`uri-id` SET `post-collection`.`author-id` = `post`.`author-id` WHERE `post-collection`.`author-id` IS null"); return Update::SUCCESS; } + +function update_1491() +{ + DBA::update('contact', ['remote_self' => Contact::MIRROR_OWN_POST], ['remote_self' => Contact::MIRROR_FORWARDED]); + return Update::SUCCESS; +} \ No newline at end of file