remove guessing function

This commit is contained in:
Django Doucet 2023-04-15 23:57:08 -06:00
parent a8b963ec26
commit 038bf25b2e

View file

@ -219,16 +219,7 @@ function get_publickey_by_actor( $actor, $key_id ) {
return new \WP_Error( 'activitypub_no_public_key', \__( 'No "Public-Key" found', 'activitypub' ), $metadata ); return new \WP_Error( 'activitypub_no_public_key', \__( 'No "Public-Key" found', 'activitypub' ), $metadata );
} }
function get_actor_from_key( $key_id ) { function get_follower_inboxes( $user_id ) {
$actor = \strip_fragment_from_url( $key_id );
if ( $actor === $key_id ) {
// strip /main-key/ for GoToSocial.
$actor = \dirname( $key_id );
}
return $actor;
}
function get_follower_inboxes( $user_id, $cc = array() ) {
$followers = \Activitypub\Peer\Followers::get_followers( $user_id ); $followers = \Activitypub\Peer\Followers::get_followers( $user_id );
$followers = array_merge( $followers, $cc ); $followers = array_merge( $followers, $cc );
$followers = array_unique( $followers ); $followers = array_unique( $followers );