mirror of
https://github.com/friendica/friendica
synced 2024-11-10 19:02:53 +00:00
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") {
|
||||
$res["ostatus_conversation"] = ostatus_convert_href($conversation["href"]);
|
||||
logger('get_atom_elements: found conversation url '.$res["ostatus_conversation"]);
|
||||
} elseif ($conversation["rel"] == "alternate") {
|
||||
$res["plink"] = $conversation["href"];
|
||||
logger('get_atom_elements: found plink '.$res["plink"]);
|
||||
//} elseif ($conversation["rel"] == "alternate") {
|
||||
// $res["plink"] = $conversation["href"];
|
||||
// logger('get_atom_elements: found plink '.$res["plink"]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
10
mod/item.php
10
mod/item.php
|
@ -570,21 +570,20 @@ function item_post(&$a) {
|
|||
* and we are replying, and there isn't one already
|
||||
*/
|
||||
|
||||
if($parent AND ($parent_contact['network'] === NETWORK_OSTATUS)) {
|
||||
if ($parent_contact['id'] != "")
|
||||
$contact = '@'.$parent_contact['nick'].'+'.$parent_contact['id'];
|
||||
//elseif ($parent_contact['addr'] != "")
|
||||
// $contact = '@'.$parent_contact['addr'];
|
||||
else
|
||||
$contact = '@[url='.$parent_contact['url'].']'.$parent_contact['nick'].'[/url]';
|
||||
|
||||
if ($parent_contact && ($parent_contact['network'] === NETWORK_OSTATUS)) {
|
||||
if (($parent_contact['nick']) && (!in_array($contact,$tags))) {
|
||||
if (!in_array($contact,$tags)) {
|
||||
$body = $contact.' '.$body;
|
||||
$tags[] = $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`
|
||||
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'];
|
||||
|
@ -593,7 +592,6 @@ function item_post(&$a) {
|
|||
$toplevel_contact = '@[url='.$toplevel_parent[0]['author-link'].']'.$toplevel_parent[0]['author-name'].'[/url]';
|
||||
}
|
||||
|
||||
if ($toplevel_contact != "")
|
||||
if (!in_array($toplevel_contact,$tags))
|
||||
$tags[] = $toplevel_contact;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue