diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index 0caf8f25d..fe9beeb27 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -281,7 +281,8 @@ class Inbox } if($actor->followers_count == 0) { - if(FollowerService::followerCount($actor->id, true) == 0) { + if(config('federation.activitypub.ingest.store_notes_without_followers')) { + } else if(FollowerService::followerCount($actor->id, true) == 0) { return; } } diff --git a/config/federation.php b/config/federation.php index 4b6795687..773d3d16b 100644 --- a/config/federation.php +++ b/config/federation.php @@ -2,56 +2,59 @@ return [ - /* - |-------------------------------------------------------------------------- - | ActivityPub - |-------------------------------------------------------------------------- - | - | ActivityPub configuration - | - */ - 'activitypub' => [ - 'enabled' => env('ACTIVITY_PUB', false), - 'outbox' => env('AP_OUTBOX', true), - 'inbox' => env('AP_INBOX', true), - 'sharedInbox' => env('AP_SHAREDINBOX', true), + /* + |-------------------------------------------------------------------------- + | ActivityPub + |-------------------------------------------------------------------------- + | + | ActivityPub configuration + | + */ + 'activitypub' => [ + 'enabled' => env('ACTIVITY_PUB', false), + 'outbox' => env('AP_OUTBOX', true), + 'inbox' => env('AP_INBOX', true), + 'sharedInbox' => env('AP_SHAREDINBOX', true), - 'remoteFollow' => env('AP_REMOTE_FOLLOW', true), + 'remoteFollow' => env('AP_REMOTE_FOLLOW', true), - 'delivery' => [ - 'timeout' => env('ACTIVITYPUB_DELIVERY_TIMEOUT', 30.0), - 'concurrency' => env('ACTIVITYPUB_DELIVERY_CONCURRENCY', 10), - 'logger' => [ - 'enabled' => env('AP_LOGGER_ENABLED', false), - 'driver' => 'log' - ] - ] - ], + 'delivery' => [ + 'timeout' => env('ACTIVITYPUB_DELIVERY_TIMEOUT', 30.0), + 'concurrency' => env('ACTIVITYPUB_DELIVERY_CONCURRENCY', 10), + 'logger' => [ + 'enabled' => env('AP_LOGGER_ENABLED', false), + 'driver' => 'log' + ] + ], - 'atom' => [ - 'enabled' => env('ATOM_FEEDS', true), - ], + 'ingest' => [ + 'store_notes_without_followers' => env('AP_INGEST_STORE_NOTES_WITHOUT_FOLLOWERS', false), + ], + ], - 'avatars' => [ - 'store_local' => env('REMOTE_AVATARS', true), - ], + 'atom' => [ + 'enabled' => env('ATOM_FEEDS', true), + ], - 'nodeinfo' => [ - 'enabled' => env('NODEINFO', true), - ], + 'avatars' => [ + 'store_local' => env('REMOTE_AVATARS', true), + ], - 'webfinger' => [ - 'enabled' => env('WEBFINGER', true) - ], + 'nodeinfo' => [ + 'enabled' => env('NODEINFO', true), + ], - 'network_timeline' => env('PF_NETWORK_TIMELINE', true), - 'network_timeline_days_falloff' => env('PF_NETWORK_TIMELINE_DAYS_FALLOFF', 2), + 'webfinger' => [ + 'enabled' => env('WEBFINGER', true) + ], - 'custom_emoji' => [ - 'enabled' => env('CUSTOM_EMOJI', false), + 'network_timeline' => env('PF_NETWORK_TIMELINE', true), + 'network_timeline_days_falloff' => env('PF_NETWORK_TIMELINE_DAYS_FALLOFF', 2), - // max size in bytes, default is 2mb - 'max_size' => env('CUSTOM_EMOJI_MAX_SIZE', 2000000), - ] + 'custom_emoji' => [ + 'enabled' => env('CUSTOM_EMOJI', false), + // max size in bytes, default is 2mb + 'max_size' => env('CUSTOM_EMOJI_MAX_SIZE', 2000000), + ], ];