Attention goes to the parent notice author too

This commit is contained in:
Mikael Nordfeldth
2016-01-08 02:58:31 +01:00
parent 28cd5640c1
commit 33194b3cff
2 changed files with 7 additions and 2 deletions

View File

@@ -681,7 +681,7 @@ function common_linkify_mention(array $mention)
return $output;
}
function common_find_attentions($text, Profile $sender, Notice $parent=null)
function common_get_attentions($text, Profile $sender, Notice $parent=null)
{
$mentions = common_find_mentions($text, $sender, $parent);
$atts = array();
@@ -690,6 +690,11 @@ function common_find_attentions($text, Profile $sender, Notice $parent=null)
$atts[$mentioned->getUri()] = $mentioned->isGroup() ? ActivityObject::GROUP : ActivityObject::PERSON;
}
}
if ($parent instanceof Notice) {
$parentAuthor = $parent->getProfile();
// afaik groups can't be authors
$atts[$parentAuthor->getUri()] = ActivityObject::PERSON;
}
return $atts;
}