Skip to content

Commit

Permalink
fix update and delete dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle committed Jan 31, 2023
1 parent bc8cb19 commit d4b1edc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/class-activity-dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static function send_update_activity( $activitypub_post ) {
$user_id = $activitypub_post->get_post_author();

$activitypub_activity = new \Activitypub\Model\Activity( 'Update', \Activitypub\Model\Activity::TYPE_FULL );
$activitypub_activity->from_post( $activitypub_post->to_array() );
$activitypub_activity->from_post( $activitypub_post );

foreach ( \Activitypub\get_follower_inboxes( $user_id ) as $inbox => $to ) {
$activitypub_activity->set_to( $to );
Expand All @@ -87,7 +87,7 @@ public static function send_delete_activity( $activitypub_post ) {
$user_id = $activitypub_post->get_post_author();

$activitypub_activity = new \Activitypub\Model\Activity( 'Delete', \Activitypub\Model\Activity::TYPE_FULL );
$activitypub_activity->from_post( $activitypub_post->to_array() );
$activitypub_activity->from_post( $activitypub_post );

foreach ( \Activitypub\get_follower_inboxes( $user_id ) as $inbox => $to ) {
$activitypub_activity->set_to( $to );
Expand Down

0 comments on commit d4b1edc

Please sign in to comment.