// notice's nickname and %3$s is the content of the favorited notice.)
$act->content = sprintf(_('%1$s favorited something by %2$s: %3$s'),
$actor->getNickname(), $target->getProfile()->getNickname(),
- $target->rendered ?: $target->content);
+ $target->getRendered());
$act->actor = $actor->asActivityObject();
$act->target = $target->asActivityObject();
$act->objects = array(clone($act->target));
// notice's nickname and %3$s is the content of the favorited notice.)
$act->content = sprintf(_('%1$s favorited something by %2$s: %3$s'),
$actor->getNickname(), $target->getProfile()->getNickname(),
- $target->rendered ?: $target->content);
+ $target->getRendered());
$act->actor = $actor->asActivityObject();
$act->target = $target->asActivityObject();
$actobj->objects = array(clone($actobj->target));
$actobj->verb = ActivityVerb::FAVORITE;
$actobj->title = ActivityUtils::verbToTitle($actobj->verb);
- $actobj->content = $this->getTarget()->rendered ?: $this->getTarget()->content;
+ $actobj->content = $this->getTarget()->getRendered();
return $actobj;
}
*/
static public function parseActivityObject(ActivityObject $actobj, Notice $stored)
{
+ // throws exception if nothing was found, but it could also be a non-Notice...
+ // FIXME: This should only test _one_ URI (and not the links etc.) though a function like this could be useful in other cases
$local = ActivityUtils::findLocalObject($actobj->getIdentifiers());
if (!$local instanceof Notice) {
// $local always returns something, but this was not what we expected. Something is wrong.