]> git.mxchange.org Git - friendica.git/commitdiff
Improved tagging
authorMichael Vogel <icarus@dabo.de>
Wed, 3 Jun 2015 09:27:56 +0000 (11:27 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 3 Jun 2015 09:27:56 +0000 (11:27 +0200)
mod/item.php

index 093316dbeea2ab56b9e19372743d6c6e0476aa84..f38b632d763bc01c9becb5e92cceaca7a93748d5 100644 (file)
@@ -582,8 +582,9 @@ function item_post(&$a) {
                }
 
                $toplevel_contact = "";
-               $toplevel_parent = q("SELECT `contact`.* FROM `contact` INNER JOIN `item` ON `item`.`contact-id` = `contact`.`id`
-                                       WHERE `item`.`id` = `item`.`parent` AND `item`.`parent` = %d", intval($parent));
+               $toplevel_parent = q("SELECT `contact`.* FROM `contact`
+                                               INNER JOIN `item` ON `item`.`contact-id` = `contact`.`id` AND `contact`.`url` = `item`.`author-link`
+                                               WHERE `item`.`id` = `item`.`parent` AND `item`.`parent` = %d", intval($parent));
                if ($toplevel_parent)
                        $toplevel_contact = '@'.$toplevel_parent[0]['nick'].'+'.$toplevel_parent[0]['id'];
                else {
@@ -593,6 +594,8 @@ function item_post(&$a) {
 
                if (!in_array($toplevel_contact,$tags))
                        $tags[] = $toplevel_contact;
+
+               logger("OStatus tags ".print_r($tags, true), LOGGER_DEBUG);
        }
 
        $tagged = array();