Improved tagging
This commit is contained in:
parent
b60677ef1b
commit
c416ce4893
1 changed files with 5 additions and 2 deletions
|
@ -582,8 +582,9 @@ function item_post(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$toplevel_contact = "";
|
$toplevel_contact = "";
|
||||||
$toplevel_parent = q("SELECT `contact`.* FROM `contact` INNER JOIN `item` ON `item`.`contact-id` = `contact`.`id`
|
$toplevel_parent = q("SELECT `contact`.* FROM `contact`
|
||||||
WHERE `item`.`id` = `item`.`parent` AND `item`.`parent` = %d", intval($parent));
|
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)
|
if ($toplevel_parent)
|
||||||
$toplevel_contact = '@'.$toplevel_parent[0]['nick'].'+'.$toplevel_parent[0]['id'];
|
$toplevel_contact = '@'.$toplevel_parent[0]['nick'].'+'.$toplevel_parent[0]['id'];
|
||||||
else {
|
else {
|
||||||
|
@ -593,6 +594,8 @@ function item_post(&$a) {
|
||||||
|
|
||||||
if (!in_array($toplevel_contact,$tags))
|
if (!in_array($toplevel_contact,$tags))
|
||||||
$tags[] = $toplevel_contact;
|
$tags[] = $toplevel_contact;
|
||||||
|
|
||||||
|
logger("OStatus tags ".print_r($tags, true), LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
$tagged = array();
|
$tagged = array();
|
||||||
|
|
Loading…
Reference in a new issue