Add Server Class, known_inboxes method
This commit is contained in:
parent
af3e61ca83
commit
3785cee6f2
1 changed files with 24 additions and 0 deletions
24
includes/class-server.php
Normal file
24
includes/class-server.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace Activitypub;
|
||||
|
||||
/**
|
||||
* ActivityPub Server Class
|
||||
*
|
||||
* @author Django Doucet
|
||||
*/
|
||||
class Server {
|
||||
|
||||
private static function known_inboxes () {
|
||||
$authors = get_users( array(
|
||||
'capability' => 'publish_posts'
|
||||
) );
|
||||
$follower_inboxes_all = [];
|
||||
foreach ( $authors as $user ) {
|
||||
$follower_inboxes = Followers::get_inboxes( $user->ID );
|
||||
$follower_inboxes_all = array_merge( $follower_inboxes, $follower_inboxes_all );
|
||||
}
|
||||
return array_unique( array_filter( $follower_inboxes_all ) );
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue