mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +00:00
New functions to check if a contact supports that protocol
This commit is contained in:
parent
d75e3e1650
commit
264936100f
4 changed files with 81 additions and 17 deletions
|
@ -194,4 +194,18 @@ class ActivityPub
|
|||
ActivityPub\Receiver::processActivity($ldactivity, '', $uid, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given contact url does support ActivityPub
|
||||
*
|
||||
* @param string $url profile url
|
||||
* @param boolean $update Update the profile
|
||||
* @return boolean
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function isSupportedByContactUrl($url, $update = null)
|
||||
{
|
||||
return !empty(APContact::getByURL($url, $update));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue