never used

This commit is contained in:
Matthias Pfefferle 2023-11-06 14:40:05 +01:00
parent 5b440b3819
commit 1e5c7675cd

View file

@ -322,29 +322,6 @@ function url_to_webfinger( $user_url ) {
return $webfinger; return $webfinger;
} }
/**
* Determine AP audience of incoming object
* @param string $object
* @return string audience
*/
function get_audience( $object ) {
if ( in_array( AS_PUBLIC, $object['to'] ) ) {
return 'public';
}
if ( in_array( AS_PUBLIC, $object['cc'] ) ) {
return 'unlisted';
}
if ( ! in_array( AS_PUBLIC, $object['to'] ) && ! in_array( AS_PUBLIC, $object['cc'] ) ) {
$author_post_url = get_author_posts_url( $object['user_id'] );
if ( in_array( $author_post_url, $object['cc'] ) ) {
return 'followers_only';
}
if ( in_array( $author_post_url, $object['to'] ) ) {
return 'private';
}
}
}
/** /**
* Check for Tombstone Objects * Check for Tombstone Objects
* *