From c416ce4893d7f5b582f4d11398fe3cfa2a2fa5f0 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 3 Jun 2015 11:27:56 +0200 Subject: [PATCH] Improved tagging --- mod/item.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mod/item.php b/mod/item.php index 093316dbee..f38b632d76 100644 --- a/mod/item.php +++ b/mod/item.php @@ -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();