]> git.mxchange.org Git - friendica.git/blobdiff - mod/poco.php
Merge pull request #498 from fermionic/more-robust-tag-conversion
[friendica.git] / mod / poco.php
index dd8df600839373ed4cb3a16e2891e7c34c0fc8bf..acfa3ffaa98e46c637fffdf4c96e5463b5a88cdb 100644 (file)
@@ -45,6 +45,8 @@ function poco_init(&$a) {
 
        if($justme)
                $sql_extra = " and `contact`.`self` = 1 ";
+       else
+               $sql_extra = " and `contact`.`self` = 0 ";
 
        if($cid)
                $sql_extra = sprintf(" and `contact`.`id` = %d ",intval($cid));
@@ -125,8 +127,11 @@ function poco_init(&$a) {
                                        $entry['id'] = $rr['id'];
                                if($fields_ret['displayName'])
                                        $entry['displayName'] = $rr['name'];
-                               if($fields_ret['urls'])
+                               if($fields_ret['urls']) {
                                        $entry['urls'] = array(array('value' => $rr['url'], 'type' => 'profile'));
+                                       if($rr['addr'] && ($rr['network'] !== NETWORK_MAIL))
+                                               $entry['urls'][] = array('value' => 'acct:' . $rr['addr'], 'type' => 'webfinger');  
+                               }
                                if($fields_ret['preferredUsername'])
                                        $entry['preferredUsername'] = $rr['nick'];
                                if($fields_ret['photos'])