updated plugin Simple Local Avatars version 2.7.8

This commit is contained in:
2024-05-09 15:26:55 +00:00
committed by Gitium
parent 496ccfac3d
commit 62f3186aef
18 changed files with 295 additions and 80 deletions

View File

@ -4,6 +4,7 @@ namespace Activitypub\Collection;
use WP_Error;
use WP_Comment_Query;
use function Activitypub\object_to_uri;
use function Activitypub\url_to_commentid;
use function Activitypub\object_id_to_comment;
use function Activitypub\get_remote_metadata_by_actor;
@ -46,7 +47,8 @@ class Interactions {
return false;
}
$meta = get_remote_metadata_by_actor( $activity['actor'] );
$actor = object_to_uri( $activity['actor'] );
$meta = get_remote_metadata_by_actor( $actor );
if ( ! $meta || \is_wp_error( $meta ) ) {
return false;

View File

@ -7,6 +7,7 @@ use Activitypub\Model\User;
use Activitypub\Model\Blog_User;
use Activitypub\Model\Application_User;
use function Activitypub\object_to_uri;
use function Activitypub\url_to_authorid;
use function Activitypub\is_user_disabled;
@ -136,6 +137,8 @@ class Users {
* @return \Acitvitypub\Model\User The User.
*/
public static function get_by_resource( $resource ) {
$resource = object_to_uri( $resource );
$scheme = 'acct';
$match = array();
// try to extract the scheme and the host