// 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;
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();
$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;
}