]> git.mxchange.org Git - friendica.git/blobdiff - include/threads.php
Aliases are now handled correctly. The public item copy gets a "real" contact id...
[friendica.git] / include / threads.php
index e9a0d7f1f271d7a4c5710d8e9b1a9f6e7005749c..bd0cb0489926df5bfb68f1be61e390d760e199da 100644 (file)
@@ -66,9 +66,11 @@ function add_thread($itemid, $onlyshadow = false) {
                if (!$r) {
                        // Preparing public shadow (removing user specific data)
                        require_once("include/items.php");
+                       require_once("include/Contact.php");
+
                        unset($item[0]['id']);
                        $item[0]['uid'] = 0;
-                       $item[0]['contact-id'] = 0;
+                       $item[0]['contact-id'] = get_contact($item[0]['author-link'], 0);
                        $public_shadow = item_store($item[0], false, false, true);
 
                        logger("add_thread: Stored public shadow for post ".$itemid." under id ".$public_shadow, LOGGER_DEBUG);