Merge pull request #12251 from annando/remote-self

"MIRROR_FORWARDED" is no more
This commit is contained in:
Hypolite Petovan 2022-11-23 17:18:20 -05:00 committed by GitHub
commit 32847f3398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,6 @@
-- ------------------------------------------ -- ------------------------------------------
-- Friendica 2022.12-dev (Giant Rhubarb) -- Friendica 2022.12-dev (Giant Rhubarb)
-- DB_UPDATE_VERSION 1490 -- DB_UPDATE_VERSION 1491
-- ------------------------------------------ -- ------------------------------------------

View File

@ -2358,8 +2358,8 @@ class Item
$result = self::insert($datarray2); $result = self::insert($datarray2);
Logger::info('remote-self post original item', ['contact' => $contact['url'], 'result'=> $result, 'item' => $datarray2]); Logger::info('remote-self post original item', ['contact' => $contact['url'], 'result'=> $result, 'item' => $datarray2]);
} else { } else {
$datarray["app"] = "Feed"; Logger::info('No valid mirroring option', ['uid' => $contact['uid'], 'id' => $contact['id'], 'network' => $contact['network'], 'remote_self' => $contact['remote_self']]);
$result = true; return false;
} }
return (bool)$result; return (bool)$result;

View File

@ -55,7 +55,7 @@
use Friendica\Database\DBA; use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) { if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1490); define('DB_UPDATE_VERSION', 1491);
} }
return [ return [

View File

@ -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"); 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; return Update::SUCCESS;
} }
function update_1491()
{
DBA::update('contact', ['remote_self' => Contact::MIRROR_OWN_POST], ['remote_self' => Contact::MIRROR_FORWARDED]);
return Update::SUCCESS;
}