Attention goes to the parent notice author too
This commit is contained in:
parent
28cd5640c1
commit
33194b3cff
@ -189,7 +189,7 @@ class NewnoticeAction extends FormAction
|
||||
|
||||
// FIXME: We should be able to get the attentions from common_render_content!
|
||||
// and maybe even directly save whether they're local or not!
|
||||
$act->context->attention = common_find_attentions($content, $this->scoped, $parent);
|
||||
$act->context->attention = common_get_attentions($content, $this->scoped, $parent);
|
||||
|
||||
$actobj = new ActivityObject();
|
||||
$actobj->type = ActivityObject::NOTE;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user