From ea2ad27ba2535ddfd845f35e05993d1e0ae50251 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sun, 9 Sep 2018 18:51:59 -0600 Subject: [PATCH] Implement delivery --- inc/deliver.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/deliver.php b/inc/deliver.php index 523f6f5..9959118 100644 --- a/inc/deliver.php +++ b/inc/deliver.php @@ -75,8 +75,12 @@ function retrieve_recipients( $url ) { function post_activity_to_inboxes( $activity, $recipients ) { foreach ( $inbox as $recipients ) { - // TODO - wp_remote_post(); + $args = array( + 'body' => $activity, + 'headers' => array( 'Content-Type' => 'application/ld+json' ) + ); + // TODO do something with the result? + wp_remote_post( $inbox, $args ); } } ?>