From 7543884a17d4168ade43faaafa775980f397e320 Mon Sep 17 00:00:00 2001 From: Django Doucet Date: Fri, 10 Nov 2023 08:25:14 -0700 Subject: [PATCH] Add blog user followers to known inboxes --- includes/class-server.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/includes/class-server.php b/includes/class-server.php index 06e8eec..06566a8 100644 --- a/includes/class-server.php +++ b/includes/class-server.php @@ -2,6 +2,11 @@ namespace Activitypub; +use Activitypub\Collection\Followers; +use Activitypub\Collection\Users; + +use function Activitypub\is_user_disabled; + /** * ActivityPub Server Class * @@ -20,6 +25,10 @@ class Server { $follower_inboxes = Followers::get_inboxes( $user->ID ); $follower_inboxes_all = array_merge( $follower_inboxes, $follower_inboxes_all ); } + if ( ! is_user_disabled( Users::BLOG_USER_ID ) ) { + $follower_inboxes = Followers::get_inboxes( Users::BLOG_USER_ID ); + $follower_inboxes_all = array_merge( $follower_inboxes, $follower_inboxes_all ); + } return array_unique( array_filter( $follower_inboxes_all ) ); } }