*/
public static function isSupportedByContactUrl(string $url, ?bool $update = null): bool
{
- $contact = Contact::getByURL($url, $update);
+ $contact = Contact::getByURL($url, $update, ['uri-id', 'network']);
- return DI::dsprContact()->existsByUriId($contact['uri-id'] ?? 0);
+ $supported = DI::dsprContact()->existsByUriId($contact['uri-id'] ?? 0);
+
+ if (!$supported && is_null($update) && ($contact['network'] == Protocol::DFRN)) {
+ $supported = self::isSupportedByContactUrl($url, true);
+ }
+
+ return $supported;
}
/**
return false;
}
- if (!self::isSupportedByContactUrl($parent_post['author-link'], false)) {
+ if (!self::isSupportedByContactUrl($parent_post['author-link'])) {
Logger::info('Parent author is no Diaspora contact.', ['parent-id' => $parent_id]);
return false;
}