]> git.mxchange.org Git - friendica.git/commitdiff
Added description
authorMichael Vogel <icarus@dabo.de>
Wed, 20 Apr 2016 05:26:18 +0000 (07:26 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 20 Apr 2016 05:26:18 +0000 (07:26 +0200)
include/socgraph.php

index f7dd1ad93b11c02c89bb66be80451f443ccd4a08..d13dc1cd63084abb49897d959fd625b6bd3ee891 100644 (file)
@@ -1377,12 +1377,19 @@ function clean_contact_url($url) {
         return $new_url;
 }
 
+/**
+ * @brief Replace alternate OStatus user format with the primary one
+ *
+ * @param arr $contact contact array (called by reference)
+ */
 function fix_alternate_contact_address(&$contact) {
        if (($contact["network"] == NETWORK_OSTATUS) AND poco_alternate_ostatus_url($contact["url"])) {
                $data = probe_url($contact["url"]);
-               if (!in_array($contact["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
+               if ($contact["network"] == NETWORK_OSTATUS) {
+                       logger("Fix primary url from ".$contact["url"]." to ".$data["url"], LOGGER_DEBUG);
                        $contact["url"] = $data["url"];
                        $contact["addr"] = $data["addr"];
+                       $contact["alias"] = $data["alias"];
                        $contact["server_url"] = $data["baseurl"];
                }
        }