]> git.mxchange.org Git - friendica.git/commitdiff
webfinger_dfrn now work as expected
authorMichael Vogel <ike@pirati.ca>
Sun, 9 Oct 2016 10:47:47 +0000 (10:47 +0000)
committerMichael Vogel <ike@pirati.ca>
Sun, 9 Oct 2016 10:47:47 +0000 (10:47 +0000)
include/Probe.php

index d8814036d91a5a357d2d5cf743d0876a2ca479af..a245ef250f2e12b001de453a98d6dca410795761 100644 (file)
@@ -118,18 +118,16 @@ class Probe {
         */
 
        public static function webfinger_dfrn($webbie, &$hcard) {
-               if (!strstr($webbie, '@'))
-                       return $webbie;
 
                $profile_link = '';
 
-               $links = self::webfinger($webbie);
+               $links = self::lrdd($webbie);
                logger('webfinger_dfrn: '.$webbie.':'.print_r($links,true), LOGGER_DATA);
                if (count($links)) {
                        foreach ($links as $link) {
                                if ($link['@attributes']['rel'] === NAMESPACE_DFRN)
                                        $profile_link = $link['@attributes']['href'];
-                               if ($link['@attributes']['rel'] === NAMESPACE_OSTATUSSUB)
+                               if (($link['@attributes']['rel'] === NAMESPACE_OSTATUSSUB) AND ($profile_link == ""))
                                        $profile_link = 'stat:'.$link['@attributes']['template'];
                                if ($link['@attributes']['rel'] === 'http://microformats.org/profile/hcard')
                                        $hcard = $link['@attributes']['href'];