]> git.mxchange.org Git - friendica.git/commitdiff
Store the source of incoming posts
authorMichael <heluecht@pirati.ca>
Tue, 8 Nov 2022 06:40:22 +0000 (06:40 +0000)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 8 Nov 2022 16:53:09 +0000 (11:53 -0500)
src/Model/Item.php
static/defaults.config.php

index 400e03a401d925fdb9b8ae92b09c312605c882a5..e0ee5607dadfb720410a0d6f904910d1637e7cc5 100644 (file)
@@ -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']);
                }
 
index 83c0d371fe82fa75a128a90758071355e844c1b8..ea9fca2f5693115aa64e764c8be5360fe75448d0 100644 (file)
@@ -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)