]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/OStatus.php
Check for href existence for links in Protocol\PortableContact
[friendica.git] / src / Protocol / OStatus.php
index dec5c4c80b021a572da0d951304a7234dcbab6bc..81e5c19db8cc42d73eaf2c5e7adc2f2f74c2cb53 100644 (file)
@@ -417,13 +417,6 @@ class OStatus
                                $author = self::fetchAuthor($xpath, $entry, $importer, $contact, $stored);
                        }
 
-                       $value = XML::getFirstNodeValue($xpath, 'atom:author/poco:preferredUsername/text()', $entry);
-                       if ($value != "") {
-                               $nickname = $value;
-                       } else {
-                               $nickname = $author["author-name"];
-                       }
-
                        $item = array_merge($header, $author);
 
                        $item["uri"] = XML::getFirstNodeValue($xpath, 'atom:id/text()', $entry);
@@ -463,7 +456,7 @@ class OStatus
                        }
 
                        if ($item["verb"] == ACTIVITY_FOLLOW) {
-                               Contact::addRelationship($importer, $contact, $item, $nickname);
+                               Contact::addRelationship($importer, $contact, $item);
                                continue;
                        }
 
@@ -1515,7 +1508,7 @@ class OStatus
                                $author->appendChild($urls);
                        }
 
-                       XML::addElement($doc, $author, "followers", "", ["url" => System::baseUrl()."/viewcontacts/".$owner["nick"]]);
+                       XML::addElement($doc, $author, "followers", "", ["url" => System::baseUrl() . "/profile/" . $owner["nick"] . "/contacts/followers"]);
                        XML::addElement($doc, $author, "statusnet:profile_info", "", ["local_id" => $owner["uid"]]);
 
                        if ($profile["publish"]) {