// Notice::saveActivity it will update the Notice object.
$stored->repeat_of = $sharedNotice->getID();
$stored->conversation = $sharedNotice->conversation;
- $stored->object_type = ActivityUtils::resolveUri(ActivityObject::ACTIVITY, true);
// We don't have to save a repeat in a separate table, we can
// find repeats by just looking at the notice.repeat_of field.
return true;
}
- common_debug('Extending activity '.$stored->id.' with '.get_called_class());
$this->extendActivity($stored, $act, $scoped);
return false;
}
{
// TODO: How to handle repeats of deleted notices?
$target = Notice::getByID($stored->repeat_of);
- $act->actor = $target->getProfile()->asActivityObject();
// TRANS: A repeat activity's title. %1$s is repeater's nickname
// and %2$s is the repeated user's nickname.
$act->title = sprintf(_('%1$s repeated a notice by %2$s'),
// Repeat is a little bit special. As it's an activity, our
// ActivityObject is instead turned into an Activity
$object = new Activity();
+ $object->actor = $stored->getProfile()->asActivityObject();
$object->verb = ActivityVerb::SHARE;
- $object->content = $stored->rendered;
+ $object->content = $stored->getRendered();
$this->extendActivity($stored, $object);
return $object;
'class' => 'h-card p-author',
'title' => $repeater->getFancyName());
- $nli->out->elementStart('span', 'repeat h-entry');
+ $nli->out->elementStart('span', 'repeat');
// TRANS: Addition in notice list item if notice was repeated. Followed by a span with a nickname.
$nli->out->raw(_('Repeated by').' ');
if ($status['repeated'] === true) {
// Qvitter API wants the "repeated_id" value set too.
$repeated = Notice::pkeyGet(array('profile_id' => $scoped->getID(),
- 'repeat_of' => $notice->getID()));
+ 'repeat_of' => $notice->getID(),
+ 'verb' => ActivityVerb::SHARE));
$status['repeated_id'] = $repeated->getID();
}
}