]> git.mxchange.org Git - friendica.git/blobdiff - include/ostatus.php
Get rid of the table "unique_contacts"
[friendica.git] / include / ostatus.php
index 4a999ae2c58c6792390f583f75e967a9ffa91fd2..c1b8233298827ccde26d96c7d20e376bf64185a1 100644 (file)
@@ -1452,9 +1452,12 @@ function ostatus_entry($doc, $item, $owner, $toplevel = false, $repeat = false)
                $repeated_owner["about"] = "";
                $repeated_owner["uid"] = 0;
 
-               $r =q("SELECT * FROM `unique_contacts` WHERE `url` = '%s'", normalise_link($repeated_item["author-link"]));
+               // Fetch the missing data from the global contacts
+               $r =q("SELECT * FROM `gcontact` WHERE `nurl` = '%s'", normalise_link($repeated_item["author-link"]));
                if ($r) {
-                       $repeated_owner["nick"] = $r[0]["nick"];
+                       if ($r[0]["nick"] != "")
+                               $repeated_owner["nick"] = $r[0]["nick"];
+
                        $repeated_owner["location"] = $r[0]["location"];
                        $repeated_owner["about"] = $r[0]["about"];
                }