Store the source of incoming posts

This commit is contained in:
Michael 2022-11-08 06:40:22 +00:00 committed by Hypolite Petovan
parent 3bd6acba7e
commit 246021fdfa
2 changed files with 8 additions and 3 deletions

View 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']);
}

View 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)