Skip to content

Commit

Permalink
Also handle Delete when bundling Blog Actor inboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwiebe authored and obenland committed Jan 22, 2025
1 parent 14a372d commit 70266cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/class-dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ public static function maybe_add_inboxes_of_blog_user( $inboxes, $actor_id, $act
if ( Actors::BLOG_USER_ID === $actor_id ) {
return $inboxes;
}
// Only if this is an Update.
if ( 'Update' !== $activity->get_type() ) {
// Only if this is an Update or Delete. Create handles its own Announce in dual user mode.
if ( ! in_array( $activity->get_type(), array( 'Update', 'Delete' ), true ) ) {
return $inboxes;
}

$blog_inboxes = Followers::get_inboxes( Actors::BLOG_USER_ID );

// array_unique is done in `send_activity_to_followers()`, no need here.
return array_merge( $inboxes, $blog_inboxes );
}

Expand Down

0 comments on commit 70266cf

Please sign in to comment.