X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FOStatus.php;h=054eaf51b2812939153424fa80058c9485ee18d9;hb=95827140891f45646ab53c6a850a3ea2389ce6e9;hp=b3685a147522e586e0e01df7218ff60452d55319;hpb=1d8b80922795c35c36e10f3415310a9ef04dd9cd;p=friendica.git diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index b3685a1475..054eaf51b2 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -2302,4 +2302,19 @@ class OStatus return trim($doc->saveXML()); } + + /** + * Checks if the given contact url does support OStatus + * + * @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 = false) + { + $probe = Probe::uri($url, Protocol::OSTATUS, 0, !$update); + return $probe['network'] == Protocol::OSTATUS; + } }