Merge pull request #1654 from annando/1506-tag-users
Bugfix: Feeds weren't imported correctly
This commit is contained in:
commit
e6e7562986
2 changed files with 14 additions and 16 deletions
|
@ -894,9 +894,9 @@ function get_atom_elements($feed, $item, $contact = array()) {
|
||||||
if ($conversation["rel"] == "ostatus:conversation") {
|
if ($conversation["rel"] == "ostatus:conversation") {
|
||||||
$res["ostatus_conversation"] = ostatus_convert_href($conversation["href"]);
|
$res["ostatus_conversation"] = ostatus_convert_href($conversation["href"]);
|
||||||
logger('get_atom_elements: found conversation url '.$res["ostatus_conversation"]);
|
logger('get_atom_elements: found conversation url '.$res["ostatus_conversation"]);
|
||||||
} elseif ($conversation["rel"] == "alternate") {
|
//} elseif ($conversation["rel"] == "alternate") {
|
||||||
$res["plink"] = $conversation["href"];
|
// $res["plink"] = $conversation["href"];
|
||||||
logger('get_atom_elements: found plink '.$res["plink"]);
|
// logger('get_atom_elements: found plink '.$res["plink"]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
24
mod/item.php
24
mod/item.php
|
@ -570,22 +570,21 @@ function item_post(&$a) {
|
||||||
* and we are replying, and there isn't one already
|
* and we are replying, and there isn't one already
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($parent_contact['id'] != "")
|
if($parent AND ($parent_contact['network'] === NETWORK_OSTATUS)) {
|
||||||
$contact = '@'.$parent_contact['nick'].'+'.$parent_contact['id'];
|
if ($parent_contact['id'] != "")
|
||||||
//elseif ($parent_contact['addr'] != "")
|
$contact = '@'.$parent_contact['nick'].'+'.$parent_contact['id'];
|
||||||
// $contact = '@'.$parent_contact['addr'];
|
else
|
||||||
else
|
$contact = '@[url='.$parent_contact['url'].']'.$parent_contact['nick'].'[/url]';
|
||||||
$contact = '@[url='.$parent_contact['url'].']'.$parent_contact['nick'].'[/url]';
|
|
||||||
|
|
||||||
if ($parent_contact && ($parent_contact['network'] === NETWORK_OSTATUS)) {
|
if (!in_array($contact,$tags)) {
|
||||||
if (($parent_contact['nick']) && (!in_array($contact,$tags))) {
|
|
||||||
$body = $contact.' '.$body;
|
$body = $contact.' '.$body;
|
||||||
$tags[] = $contact;
|
$tags[] = $contact;
|
||||||
}
|
}
|
||||||
|
|
||||||
$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,9 +592,8 @@ function item_post(&$a) {
|
||||||
$toplevel_contact = '@[url='.$toplevel_parent[0]['author-link'].']'.$toplevel_parent[0]['author-name'].'[/url]';
|
$toplevel_contact = '@[url='.$toplevel_parent[0]['author-link'].']'.$toplevel_parent[0]['author-name'].'[/url]';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($toplevel_contact != "")
|
if (!in_array($toplevel_contact,$tags))
|
||||||
if (!in_array($toplevel_contact,$tags))
|
$tags[] = $toplevel_contact;
|
||||||
$tags[] = $toplevel_contact;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$tagged = array();
|
$tagged = array();
|
||||||
|
|
Loading…
Reference in a new issue