mirror of
https://github.com/friendica/friendica
synced 2024-12-23 06:40:15 +00:00
Always add the addressed contacts in a post to the tags.
This commit is contained in:
parent
620455c4de
commit
1a26d464dd
1 changed files with 17 additions and 16 deletions
|
@ -565,6 +565,7 @@ function item_post(&$a) {
|
||||||
|
|
||||||
$tags = get_tags($body);
|
$tags = get_tags($body);
|
||||||
|
|
||||||
|
if($parent) {
|
||||||
/**
|
/**
|
||||||
* add a statusnet style reply tag if the original post was from there
|
* add a statusnet style reply tag if the original post was from there
|
||||||
* and we are replying, and there isn't one already
|
* and we are replying, and there isn't one already
|
||||||
|
@ -577,9 +578,10 @@ function item_post(&$a) {
|
||||||
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))) {
|
if ($parent_contact['network'] === NETWORK_OSTATUS)
|
||||||
$body = $contact.' '.$body;
|
$body = $contact.' '.$body;
|
||||||
|
|
||||||
$tags[] = $contact;
|
$tags[] = $contact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -593,7 +595,6 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue