use Friendica\Model\Profile;
use Friendica\Protocol\Email;
use Friendica\Protocol\Feed;
+use Friendica\Protocol\ActivityPub;
use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
$uid = local_user();
}
- $data = self::detect($uri, $network, $uid);
+ if ($network != Protocol::ACTIVITYPUB) {
+ $data = self::detect($uri, $network, $uid);
+ } else {
+ $data = null;
+ }
+
+ if (in_array(defaults($data, 'network', ''), ['', Protocol::PHANTOM])) {
+ $ap_profile = ActivityPub::fetchProfile($uri);
+ if (!empty($ap_profile) && ($ap_profile['network'] == Protocol::ACTIVITYPUB)) {
+ $data = $ap_profile;
+ }
+ }
if (!isset($data["url"])) {
$data["url"] = $uri;