From 0f751fc1eb3092ce8650643ffba31ab91b638ab7 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 18 Aug 2024 01:01:35 -0600 Subject: [PATCH 1/3] Update pixelfed.php --- config/pixelfed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/pixelfed.php b/config/pixelfed.php index b1b42daa1..768d40e49 100644 --- a/config/pixelfed.php +++ b/config/pixelfed.php @@ -195,7 +195,7 @@ return [ | Max User Limit |-------------------------------------------------------------------------- | - | Allow a maximum number of user accounts. Default: off + | Allow a maximum number of user accounts. Default: enabled w/ 1000 max users | */ 'max_users' => env('PF_MAX_USERS', 1000), From 6cd1cbb41a92b2f387c16f3f5844cf308857f4ab Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 18 Aug 2024 01:59:24 -0600 Subject: [PATCH 2/3] Update BeagleService, disable discovery if AP is disabled --- app/Services/Internal/BeagleService.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Services/Internal/BeagleService.php b/app/Services/Internal/BeagleService.php index 3c8fcf104..2dcc32a4c 100644 --- a/app/Services/Internal/BeagleService.php +++ b/app/Services/Internal/BeagleService.php @@ -51,6 +51,10 @@ class BeagleService public static function getDiscover() { + if ((bool) config_cache('federation.activitypub.enabled') == false) { + return []; + } + return Cache::remember(self::DISCOVER_CACHE_KEY, now()->addHours(6), function () { try { $res = Http::withOptions(['allow_redirects' => false]) @@ -84,6 +88,10 @@ class BeagleService public static function getDiscoverPosts() { + if ((bool) config_cache('federation.activitypub.enabled') == false) { + return []; + } + return Cache::remember(self::DISCOVER_POSTS_CACHE_KEY, now()->addHours(1), function () { $posts = collect(self::getDiscover()) ->filter(function ($post) { From 520dd93ca2f0f3f42ebccddec583aa3a5ac4ba19 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 18 Aug 2024 01:59:47 -0600 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aad5c9570..8626c7d4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Update ApiV1Dot1Controller, add new single media status create endpoint ([b03f5cec](https://github.com/pixelfed/pixelfed/commit/b03f5cec)) - Update AdminSettings component, add link to Custom CSS settings ([958daac4](https://github.com/pixelfed/pixelfed/commit/958daac4)) - Update ApiV1Controller, fix v1/instance stats, force cast to int ([dcd95d68](https://github.com/pixelfed/pixelfed/commit/dcd95d68)) +- Update BeagleService, disable discovery if AP is disabled ([6cd1cbb4](https://github.com/pixelfed/pixelfed/commit/6cd1cbb4)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.12.3 (2024-07-01)](https://github.com/pixelfed/pixelfed/compare/v0.12.2...v0.12.3)