if (Event::handle('StartNoticeAsActivity', array($this, &$act))) {
+ $act->id = $this->uri;
+ $act->time = strtotime($this->created);
+ $act->link = $this->bestUrl();
+ $act->content = common_xml_safe_str($this->rendered);
+ $act->title = common_xml_safe_str($this->content);
+
$profile = $this->getProfile();
$act->actor = ActivityObject::fromProfile($profile);
$act->actor->extra[] = $profile->profileInfo($cur);
- $act->verb = ActivityVerb::POST;
- $act->objects[] = ActivityObject::fromNotice($this);
- // XXX: should this be handled by default processing for object entry?
+ if ($this->repeat_of) {
- $act->time = strtotime($this->created);
- $act->link = $this->bestUrl();
+ $repeated = Notice::staticGet('id', $this->repeat_of);
- $act->content = common_xml_safe_str($this->rendered);
- $act->id = $this->uri;
- $act->title = common_xml_safe_str($this->content);
+ $act->verb = ActivityVerb::SHARE;
+ $act->objects[] = $repeated->asActivity($cur);
+
+ } else {
+
+ $act->verb = ActivityVerb::POST;
+ $act->objects[] = ActivityObject::fromNotice($this);
+
+ }
+
+ // XXX: should this be handled by default processing for object entry?
// Categories