From 32e08d7f683c38eedc719b8b19e8d0e0c8b1a982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Wed, 27 Dec 2023 15:38:04 +0100 Subject: [PATCH] fix: the application announces all posts no matter whether the blog user is disabled or not --- includes/class-activity-dispatcher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-activity-dispatcher.php b/includes/class-activity-dispatcher.php index dc3d31c..c853882 100644 --- a/includes/class-activity-dispatcher.php +++ b/includes/class-activity-dispatcher.php @@ -44,16 +44,16 @@ class Activity_Dispatcher { // check if a migration is needed before sending new post Migration::maybe_migrate(); + self::send_announce( $wp_object, $type, Users::APPLICATION_USER_ID ); + if ( is_user_type_disabled( 'blog' ) ) { return; } if ( is_single_user() ) { self::send_activity( $wp_object, $type, Users::BLOG_USER_ID ); - self::send_announce( $wp_object, $type, Users::APPLICATION_USER_ID ); } else { self::send_announce( $wp_object, $type, Users::BLOG_USER_ID ); - self::send_announce( $wp_object, $type, Users::APPLICATION_USER_ID ); } }