- if (empty($pubkey)) {
- $actor = JsonLD::fetchElement($data, 'actor', 'id');
- if (empty($actor)) {
- return false;
- }
-
- $profile = ActivityPub::fetchprofile($actor);
- if (empty($profile['pubkey'])) {
- return false;
- }
- $pubkey = $profile['pubkey'];
+ $actor = JsonLD::fetchElement($data, 'actor', 'id');
+ if (empty($actor)) {
+ return false;
+ }
+
+ $profile = APContact::getByURL($actor);
+ if (empty($profile['pubkey'])) {
+ return false;