Skip to content

Commit

Permalink
Try to lookup local users first (#782)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle authored Jun 11, 2024
1 parent 02678ee commit 0e710d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions integration/class-enable-mastodon-apps.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ public static function api_account_external( $user_data, $user_id ) {
return $user_data;
}

$user = Users::get_by_various( $user_id );

if ( $user && ! is_wp_error( $user ) ) {
return $user_data;
}

$uri = Webfinger_Util::resolve( $user_id );

if ( ! $uri || is_wp_error( $uri ) ) {
Expand Down

0 comments on commit 0e710d0

Please sign in to comment.