From: Michael Date: Tue, 8 Nov 2022 06:40:22 +0000 (+0000) Subject: Store the source of incoming posts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=246021fdfa7cb16153fed57ad1a9316dbda5afa9;p=friendica.git Store the source of incoming posts --- diff --git a/src/Model/Item.php b/src/Model/Item.php index 400e03a401..e0ee5607da 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1328,10 +1328,11 @@ class Item } } + if (!empty($source) && ($transmit || DI::config()->get('debug', 'store_source'))) { + Post\Activity::insert($item['uri-id'], $source); + } + if ($transmit) { - if (!empty($source)) { - Post\Activity::insert($item['uri-id'], $source); - } Worker::add(['priority' => $priority, 'dont_fork' => true], 'Notifier', $notify_type, (int)$posted_item['uri-id'], (int)$posted_item['uid']); } diff --git a/static/defaults.config.php b/static/defaults.config.php index 83c0d371fe..ea9fca2f56 100644 --- a/static/defaults.config.php +++ b/static/defaults.config.php @@ -731,6 +731,10 @@ return [ // ap_log_failure (Boolean) // Logs every ActivityPub activity that couldn't be compacted 'ap_log_failure' => false, + + // store_source (Boolean) + // Store the source of any post that arrived + 'store_source' => false, ], 'smarty3' => [ // config_dir (String)