Update Inbox, allow storing Create->Note activities without any local followers, disabled by default

This commit is contained in:
Daniel Supernault 2023-07-13 23:11:19 -06:00
parent 4b2c66f557
commit 9fa6b3f7aa
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 47 additions and 43 deletions

View file

@ -281,7 +281,8 @@ class Inbox
} }
if($actor->followers_count == 0) { 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; return;
} }
} }

View file

@ -2,56 +2,59 @@
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| ActivityPub | ActivityPub
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| ActivityPub configuration | ActivityPub configuration
| |
*/ */
'activitypub' => [ 'activitypub' => [
'enabled' => env('ACTIVITY_PUB', false), 'enabled' => env('ACTIVITY_PUB', false),
'outbox' => env('AP_OUTBOX', true), 'outbox' => env('AP_OUTBOX', true),
'inbox' => env('AP_INBOX', true), 'inbox' => env('AP_INBOX', true),
'sharedInbox' => env('AP_SHAREDINBOX', true), 'sharedInbox' => env('AP_SHAREDINBOX', true),
'remoteFollow' => env('AP_REMOTE_FOLLOW', true), 'remoteFollow' => env('AP_REMOTE_FOLLOW', true),
'delivery' => [ 'delivery' => [
'timeout' => env('ACTIVITYPUB_DELIVERY_TIMEOUT', 30.0), 'timeout' => env('ACTIVITYPUB_DELIVERY_TIMEOUT', 30.0),
'concurrency' => env('ACTIVITYPUB_DELIVERY_CONCURRENCY', 10), 'concurrency' => env('ACTIVITYPUB_DELIVERY_CONCURRENCY', 10),
'logger' => [ 'logger' => [
'enabled' => env('AP_LOGGER_ENABLED', false), 'enabled' => env('AP_LOGGER_ENABLED', false),
'driver' => 'log' 'driver' => 'log'
] ]
] ],
],
'atom' => [ 'ingest' => [
'enabled' => env('ATOM_FEEDS', true), 'store_notes_without_followers' => env('AP_INGEST_STORE_NOTES_WITHOUT_FOLLOWERS', false),
], ],
],
'avatars' => [ 'atom' => [
'store_local' => env('REMOTE_AVATARS', true), 'enabled' => env('ATOM_FEEDS', true),
], ],
'nodeinfo' => [ 'avatars' => [
'enabled' => env('NODEINFO', true), 'store_local' => env('REMOTE_AVATARS', true),
], ],
'webfinger' => [ 'nodeinfo' => [
'enabled' => env('WEBFINGER', true) 'enabled' => env('NODEINFO', true),
], ],
'network_timeline' => env('PF_NETWORK_TIMELINE', true), 'webfinger' => [
'network_timeline_days_falloff' => env('PF_NETWORK_TIMELINE_DAYS_FALLOFF', 2), 'enabled' => env('WEBFINGER', true)
],
'custom_emoji' => [ 'network_timeline' => env('PF_NETWORK_TIMELINE', true),
'enabled' => env('CUSTOM_EMOJI', false), 'network_timeline_days_falloff' => env('PF_NETWORK_TIMELINE_DAYS_FALLOFF', 2),
// max size in bytes, default is 2mb 'custom_emoji' => [
'max_size' => env('CUSTOM_EMOJI_MAX_SIZE', 2000000), 'enabled' => env('CUSTOM_EMOJI', false),
]
// max size in bytes, default is 2mb
'max_size' => env('CUSTOM_EMOJI_MAX_SIZE', 2000000),
],
]; ];