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)
-- DB_UPDATE_VERSION 1490
-- DB_UPDATE_VERSION 1491
-- ------------------------------------------

View File

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

View File

@ -55,7 +55,7 @@
use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1490);
define('DB_UPDATE_VERSION', 1491);
}
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");
return Update::SUCCESS;
}
function update_1491()
{
DBA::update('contact', ['remote_self' => Contact::MIRROR_OWN_POST], ['remote_self' => Contact::MIRROR_FORWARDED]);
return Update::SUCCESS;
}